#25: Compiler bug ----------------------+----------------------------------------------------- Reporter: rtoy | Owner: somebody Type: defect | Status: new Priority: major | Milestone: Component: Core | Version: 2008-11 Keywords: compiler | ----------------------+----------------------------------------------------- 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.
#25: Compiler bug ---------------------+------------------------------------------------------ Reporter: rtoy | Owner: somebody Type: defect | Status: new Priority: major | Milestone: Component: Core | Version: 2008-11 Resolution: | Keywords: compiler ---------------------+------------------------------------------------------
Comment(by rtoy):
A related bug
{{{ (defun foo2 () (catch (make-symbol "CMUCL-DEBUG-CATCH-TAG") (make-string 49))) }}}
Same results: {{{STACK-ANALYZE}}} crashes because {{{NODE-PREV}}} is {{{NIL}}}.
#25: Compiler bug ---------------------+------------------------------------------------------ Reporter: rtoy | Owner: somebody Type: defect | Status: new Priority: major | Milestone: Component: Core | Version: 2008-11 Resolution: | Keywords: compiler ---------------------+------------------------------------------------------
Comment(by rtoy):
Replying to [comment:1 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.
#25: Compiler bug ---------------------+------------------------------------------------------ Reporter: rtoy | Owner: somebody Type: defect | Status: new Priority: major | Milestone: Component: Core | Version: 2008-11 Resolution: | Keywords: compiler ---------------------+------------------------------------------------------
Comment(by rtoy):
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.)
#25: Compiler bug ---------------------+------------------------------------------------------ Reporter: rtoy | Owner: somebody Type: defect | Status: closed Priority: major | Milestone: Component: Core | Version: 2008-11 Resolution: fixed | Keywords: compiler ---------------------+------------------------------------------------------ Changes (by rtoy):
* status: new => closed * resolution: => fixed