Opened 14 years ago

Closed 14 years ago

#298 closed defect (fixed)

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

Reported by: felix winkelmann Owned by:
Priority: critical Milestone:
Component: core libraries Version: 4.5.x
Keywords: timeout srfi-18 time Cc:
Estimated difficulty:

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.

Change History (2)

comment:1 Changed 14 years ago by felix winkelmann

Keywords: timeout srfi-18 time added
Milestone: 4.6.0

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.

comment:2 Changed 14 years ago by felix winkelmann

Resolution: fixed
Status: newclosed

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

Note: See TracTickets for help on using tickets.