Open wisd0me opened 10 years ago
There is a bug in integer addition in _lthread_usec_now(): signed long time_t overflows. The return statement must look like this:
/* _lthread_usec_now(): */ return (uint64_t) t1.tv_sec * 1000000 + t1.tv_usec;
Bug shows itself as follows - after some point in time lthread functions with timeouts start trashing the cpu, in my case it was lthread_read(). I've found this after I was unable to recover seconds from sched->birth on my 32bit box.
I must notice, that to confirm & fix this bug, only a few things required:
Which of them is causing the trouble?
There is a bug in integer addition in _lthread_usec_now(): signed long time_t overflows. The return statement must look like this:
Bug shows itself as follows - after some point in time lthread functions with timeouts start trashing the cpu, in my case it was lthread_read(). I've found this after I was unable to recover seconds from sched->birth on my 32bit box.