Comment 0 for bug 914612

Revision history for this message
Attila Lendvai (attila-lendvai) wrote : internal_errors_enabled is NIL in a save-lisp-and-die executable image long after startup

happens on SBCL head, which is 1.0.55

the symptom (long after startup, reproducibly triggered by a function):
-------------------
fatal error encountered in SBCL pid 712(tid 140737270740736):
internal error too early in init, can't recover

internal error #31 (Object is of the wrong type.)
    SC: 21, Offset: 6 $1= 0x1010c3b083: instance pointer
    SC: 21, Offset: 0 $2= 0x10003ee2d7: list pointer

due to:
---------
(sb-alien:extern-alien "internal_errors_enabled" boolean) => NIL

i've looked around in the SBCL code, but it should be set to T by SB-IMPL::REINIT, which in turn seems to be called from save-lisp-and-die after restart... so i don't understand what's going on.

for now my workaround is this, in my toplevel function:

      (if (sb-alien:extern-alien "internal_errors_enabled" boolean)
          (format t "TODO: delete this KLUDGE, seems like it's not needed anymore")
          (progn
            (format t "setting internal_errors_enabled to T")
            (setf (sb-alien:extern-alien "internal_errors_enabled" boolean) t)))

the image is saved by this code:

http://dwim.hu/darcsweb/darcsweb.cgi?r=HEAD%20hu.dwim.build;a=headblob;f=/source/build.lisp#l305

i've tested both with and without "1.0.48.29: better end-of-the-world handling", but the behavior is the same.