Another complicated dead code failed AVER during compile

Bug #1720402 reported by Paul F. Dietz on 2017-09-29
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
High
Unassigned

Bug Description

This is in very recent HEAD sbcl on x86-64, Linux. Found with the random tester.

(defun foo ()
  (return-from foo 0)
  (let ((v5 (catch 'ct2 nil)))
    (flet ((%f (&optional (f-1 0) (f-2 0))
             f-1))
      (%f 0 (%f))
      )))

failed AVER:
    (EQ (SB-C::LAMBDA-TAIL-SET SB-C::USE-HOME)
        (SB-C::LAMBDA-TAIL-SET
         (SB-C::COMBINATION-LAMBDA SB-C::USE)))
This is probably a bug in SBCL itself. (Alternatively, SBCL
might have been corrupted by bad user code, e.g. by an undefined
Lisp operation like (FMAKUNBOUND 'COMPILE), or by stray pointers
from alien code or from unsafe Lisp code; or there might be a
bug in the OS or hardware that SBCL is running on.) If it seems
to be a bug in SBCL itself, the maintainers would like to know
about it. Bug reports are welcome on the SBCL mailing lists,
which you can find at <http://sbcl.sourceforge.net/>.
   [Condition of type SB-INT:BUG]

Restarts:
 0: [RETRY] Retry EVAL of current toplevel form.
 1: [CONTINUE] Ignore error and continue loading file "/home/dietz/ansi-tests/f10.lsp".
 2: [ABORT] Abort loading file "/home/dietz/ansi-tests/f10.lsp".
 3: [ABORT] Exit debugger, returning to top level.

Backtrace:
  0: (SB-INT:BUG "~@<failed AVER: ~2I~_~S~:>" (EQ (SB-C::LAMBDA-TAIL-SET SB-C::USE-HOME) (SB-C::LAMBDA-TAIL-SET (SB-C::COMBINATION-LAMBDA SB-C::USE))))
  1: (SB-IMPL::%FAILED-AVER (EQ (SB-C::LAMBDA-TAIL-SET SB-C::USE-HOME) (SB-C::LAMBDA-TAIL-SET (SB-C::COMBINATION-LAMBDA SB-C::USE))))
  2: ((FLET SB-C::DO-1-USE :IN SB-C::FIND-RESULT-TYPE) #<SB-C::COMBINATION :FUN #<SB-C::REF :LEAF #<SB-C::CLAMBDA :%SOURCE-NAME %F :%DEBUG-NAME # :KIND :DELETED :TYPE #<SB-KERNEL:BUILT-IN-CLASSOID FUNCTIO..
  3: (SB-C::FIND-RESULT-TYPE #<SB-C::CRETURN :LAMBDA #<SB-C::CLAMBDA :%SOURCE-NAME FOO :%DEBUG-NAME NIL :KIND NIL :TYPE #<SB-KERNEL:BUILT-IN-CLASSOID FUNCTION (read-only)> :WHERE-FROM :DEFINED :VARS NIL {1..
  4: (SB-C::IR1-OPTIMIZE-RETURN #<SB-C::CRETURN :LAMBDA #<SB-C::CLAMBDA :%SOURCE-NAME SB-C::.ANONYMOUS. :%DEBUG-NAME (SB-C::TL-XEP FOO) :KIND :EXTERNAL :TYPE #<SB-KERNEL:BUILT-IN-CLASSOID FUNCTION (read-on..
  5: (SB-C::IR1-OPTIMIZE-BLOCK #<SB-C::CBLOCK 15 :START c1 {100412B273}>)
  6: (SB-C::IR1-OPTIMIZE #<SB-C:COMPONENT :NAME (FLET %F :IN FOO) {100412D9F3}> NIL)
  7: (SB-C::IR1-OPTIMIZE-UNTIL-DONE #<SB-C:COMPONENT :NAME (FLET %F :IN FOO) {100412D9F3}>)
  8: (SB-C::IR1-PHASES #<SB-C:COMPONENT :NAME (FLET %F :IN FOO) {100412D9F3}>)
  9: (SB-C::COMPILE-COMPONENT #<SB-C:COMPONENT :NAME (FLET %F :IN FOO) {100412D9F3}>)
 10: (SB-C::%COMPILE (SB-INT:NAMED-LAMBDA FOO NIL (BLOCK FOO (RETURN-FROM FOO 0) (LET # #

Stas Boukarev (stassats) wrote :

Will be fixed after the freeze.

Changed in sbcl:
status: New → Triaged
importance: Undecided → High
Stas Boukarev (stassats) wrote :

In 66c114d3a8aadef065a34c657295d0267b3a9e8f

Changed in sbcl:
status: Triaged → Fix Committed
Stas Boukarev (stassats) on 2017-10-31
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers