> Hello all,
Hi Bill.
> Basically, the elapsed time is calculated as final_time - start_time as
> returned by gethrvtime(), and it appears that on netbsd, there's (I'm
> assuming) an overflow that causes the elapsed time to become negative.
> It happens often enough that the total amount of time spent on a given
> set of test runs becomes increasingly negative, essentially running any
> test forever.
I suspect that there's an issue with the Pike's implementation of
get_cpu_time() on NetBSD. The behavior sounds like a 32-bit overflow.
Please instrument rusage.c to determine which implementation is in use.
> I"m sure that there's a better solution but I'd like to suggest that in
> the interim, a simple check be added to ignore any negative times:
>
> In Tools.Shoot.run_sub():
[...]
gethrvtime() et al are supposed to return 64-bit integers, and should
thus not overflow under normal circumstances.
> Does anyone have any objection to me making this change in 9.0 and 8.0?
It shouldn't be necessary...
/grubba
BTW: I have opened Pike #10138 for this bug.