Opened 16 years ago
Closed 16 years ago
#25 closed defect (fixed)
Compiler bug
Reported by: | Raymond Toy | Owned by: | somebody |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Core | Version: | 2008-11 |
Keywords: | compiler | Cc: |
Description
Reported on cmucl-imp, 2008-10-31
(declaim (optimize (speed 0) (safety 3) (debug 3))) (defun test-pop-and-return () (loop (pop *random-stack*) (return)))
When compiled, this causes an internal compiler error from STACK-ANALYZE
.
The error happens because NODE-PREV
returns NIL
instead of a node.
Change History (4)
comment:1 follow-up: 2 Changed 16 years ago by
comment:2 Changed 16 years ago by
Replying to rtoy:
Correction:
(declaim (optimize (safety 3))) (defun foo2 () (catch (make-symbol "CMUCL-DEBUG-CATCH-TAG") (make-string 49)))
There's no problem if safety < 3.
comment:3 Changed 16 years ago by
Both of these should be fixed in the 2008-12 snapshot.
I think the compiler was trying not to delete dead code when SAFETY = 3, but was erroneous linking continuations together. Now we do nothing in this case. The dead code remains and is executed and the results are never used. The above examples work fine, and the case of (progn (fboundp 42) t)
still works (fboundp triggers an error instead of being deleted as dead code.)
comment:4 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
A related bug
Same results:
STACK-ANALYZE
crashes becauseNODE-PREV
isNIL
.