Summary

SRFI-18 time objects store time span as fixnums, which can overflow

Metadata

Description

(reported by Nicolas Pelletier)

After 12 days, fixnums will overflow on 32-bit platforms. It would be better to store the milliseconds span as flonum and use flonum comparisons in srfi-18.scm and scheduler.scm.

Changes and comments

[2010-07-29 14:46:59 UTC] felix set keywords to timeout srfi-18 time

[2010-07-29 14:46:59 UTC] felix removed milestone 4.6.0

[2010-07-29 14:46:59 UTC] felix wrote:

This is quite serious. `(##sys#fudge 6)`, `(##sys#fudge 16)` and the C runtime functions `milliseconds()' and `cpu_milliseconds()`, including all variables that are set to results of these are affected. The `tcp` unit uses them for timeout calculations as does the scheduler (which is compiled in fixnum mode).

Damn.

[2010-08-10 09:37:34 UTC] felix changed status from new to closed

[2010-08-10 09:37:34 UTC] felix set resolution to fixed

[2010-08-10 09:37:34 UTC] felix wrote:

Implemented in the `flonmu-milliseconds` branch and merged into experimental. Need more testing.