Difficult to reproduce bug
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I'm seeing a failure in random testing that I can't convert to code that reliably shows the bug. This report will tell what I can.
It manifests as a simple lambda expression that happens to compile incorrectly, but then soon afterwards it compiled correctly. So, I can't just give you the lambda and have it reliably fail. Producing the failure takes a random amount of time running one of the RTP tests in the ansi-tests random test suite (specifically, RPT.RATIONALIZE).
Here's an example of such a lambda:
(LAMBDA (P1)
(DECLARE (OPTIMIZE (SPEED 3) (SAFETY 2) (DEBUG 1) (SPACE 0))
(TYPE
(OR
P1))
(RATIONALIZE (THE (OR T (EQL C)) P1)))
The failure was that it reported the value -51275393 was not in the declared type (although it is). When I disassemble the compiled form of this lambda, the result is this:
; disassembly for (LAMBDA (P1))
; Size: 5 bytes. Origin: #x554EFCDA ; (LAMBDA (P1))
; A: C9 LEAVE
; B: F8 CLC
; C: C3 RET
; D: CC10 INT3 16 ; Invalid argument count trap
When I recompile that lambda and disassemble, I get something slightly different, that doesn't show the bug:
; disassembly for (LAMBDA (P1))
; Size: 8 bytes. Origin: #x554A5BDA ; (LAMBDA (P1))
; DA: 488BD3 MOV RDX, RBX
; DD: C9 LEAVE
; DE: F8 CLC
; DF: C3 RET
; E0: CC10 INT3 16 ; Invalid argument count trap
This is x86-64, "2.4.3.
I will try to distill the random testing that generates this failure down to a smaller piece of code that can reliably stimulate the bug, but I haven't done that yet.
Changed in sbcl: | |
status: | New → Fix Committed |
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
Additional information: the compiled code that fails on that input works fine on the elements of that declared type. It's just -51275393 that causes the error.