Summary
integer? returns true for special flonum types on 64-bits machines
Metadata
- Id: c5ebc2837bf0ace0ba51bdc5d24be435fcb4d3ec
- Trac id: 791
- Type: defect
- Reporter: sjamaan
- Owner: ckeen
- Cc:
- Status: closed
- Component: core libraries
- Estimated difficulty:
- Resolution: fixed
- Priority: major
- Milestone: 4.9.0
- Version: 4.7.x
- Changetime: 2012-09-24 21:47:48 UTC
- Created: 2012-02-21 19:21:45 UTC
- Keywords: flonums, integers
Description
The C_i_integerp function doesn't first unpack flonum values before checking if they represent infinity or NaN. On x86-64, this means that (integer? +nan.0) => #t and (integer? +inf.0) => #t.
A suggested initial patch is at http://paste.call-cc.org/paste?id=2d5b17c595ae79bacbe36c52d4613ccd3e0373a2, but Christian said he'd work on a proper patch which includes changes to the testsuite to catch these errors (for the other number predicates too).
Changes and comments
[2012-03-04 12:02:38 UTC] ckeen wrote:
Patch has been submitted to chicken-hackers
[2012-03-04 12:03:54 UTC] ckeen changed status from new to accepted
[2012-03-18 17:10:25 UTC] ckeen changed status from accepted to closed
[2012-03-18 17:10:25 UTC] ckeen set resolution to fixed
[2012-03-18 17:10:25 UTC] ckeen wrote:
Fixed with patch ae91f816d0a3911d71a37e22435f83ade9c77d69 to master
[2012-09-24 21:47:48 UTC] felix changed milestone from 4.8.0 to 4.9.0
[2012-09-24 21:47:48 UTC] felix wrote:
Milestone 4.8.0 deleted