Re: Git HEAD (incl. udef-immediates) hangs in SAVE-LISP-AND-DIE

Philipp Marek via Sbcl-devel <[email protected]> Sat, 11 Apr 2026 18:46:34 +0200
Newsgroups gmane.lisp.steel-bank.devel
Message-ID <[email protected]>
Hi Doug,

> Do you have a self-contained reproducer (with your patches as part of 
> it)
> and can you find the first breaking commit?

I found the issue.


This works:

   (DEFPARAMETER gensymTABLE-SYM-1222 (sb-c::%make-lisp-obj #x61))
   (sb-ext:save-lisp-and-die "/tmp/image" :executable t)

   $ time ~/src/sbcl/run-sbcl.sh --script /tmp/repro1.lisp
   real    0m0,729s
   user    0m0,647s
   sys     0m0,081s


This was broken:
   (DEFPARAMETER gensymTABLE-SYM-1221
                 (cons (sb-c::%make-lisp-obj #x61)
                       nil))

   $ time ~/src/sbcl/run-sbcl.sh --script /tmp/repro2.lisp
   ^Z
   [1]+  Stopped                 ~/src/sbcl/run-sbcl.sh --script 
/tmp/repro2.lisp
   real    0m7,705s
   user    0m0,000s
   sys     0m0,000s
   $ kill -9 %1


Because of [1] I switched from a lowtag to the widetag #x61 last year --
since then this was broken; I didn't notice because
my contrib tests only used vectors of UDEFs with S-L-A-D,
not CONSes, so they didn't catch that; I extended them now.

Seeing that CONS in the reproducer made me remember is_cons_half()
from your mail [2]; I switched to #x75 and now it seems to work.


Might this specific value break something else?
Should I use another one?


Thank you for offering to help!


Ad 1: https://marc.info/?l=sbcl-devel&m=176513465516580&w=2
Ad 2: https://marc.info/?l=sbcl-devel&m=173427616321258&w=2