Bug in LOGAND (AMD64)
Bug #1026634 reported by
Stas Boukarev
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
High
|
Unassigned |
Bug Description
By Eric Marsden from sbcl-devel@
More bugs from random-integer testing.
This is SBCL 1.0.57.
* (defun bug (x)
(declare (optimize (space 3))
(type (integer 124172363775052
(logand 8459622733968096971 x))
* (bug 12417237222845306758)
118361657338946
Changed in sbcl: | |
importance: | Undecided → High |
status: | New → Triaged |
Changed in sbcl: | |
status: | Triaged → Fix Committed |
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
bisect result (have not investigated further, but certainly seems plausible):
52b1041d3a14eaa 4e45f6d8edfbdc0 dec4292239 is the first bad commit 4e45f6d8edfbdc0 dec4292239
commit 52b1041d3a14eaa
Author: Christophe Rhodes <email address hidden>
Date: Thu Apr 5 19:55:05 2012 +0100
Fix bug in unsigned modular arithmetic using a signed implementation
If we aim to be clever by implementing an unsigned modular arithmetic
computation using signed arithmetic, we need to make sure that we
don't accidentally contaminate the computation with any extraneous
high bits. This means that we must be sure to cut constants to the
appropriate width, as well as computations, so do so; this fixes
bug #974406 from Paul Dietz. (In addition the change from cutting
to the requested width to the implementation width fixes #903821,
so Go Team!)
Test cases. Minimally horrible test case for #903821; far worse
suggestions were made on #sbcl IRC...
:100644 100644 509ca7c5043b162 d723f6a68811943 9e774bd065 328934f43ae6875 bab69a443ce7567 722a07114f M NEWS dd48a5840188001 d35f048e0f a0fbdf585fe5f18 6ae594a8730c34b 9ebadf25da M src 3fe721f2575e5db ec4f0de6e0 a196a9358330315 31cb583eb929749 9ec65f7b8f M tests
:040000 040000 b57dbe6c0b63fc1
:040000 040000 c9d018018bdd075
bisect run success