]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't use Qunbound as hash table key when printing (bug#68244)
authorMattias Engdegård <mattiase@acm.org>
Thu, 18 Jan 2024 17:48:12 +0000 (18:48 +0100)
committerMattias Engdegård <mattiase@acm.org>
Thu, 18 Jan 2024 17:57:03 +0000 (18:57 +0100)
This flaw could cause an assertion failure.

* src/print.c (PRINT_CIRCLE_CANDIDATE_P): Don't consider Qunbound a
print-circle candidate; it should never be seen by Lisp anyway.

src/print.c

index 0899dcdeb03f84fd74ac5e499723509f4b373f0a..61999c096aafbd7810b671de32527e123240de4d 100644 (file)
@@ -1311,7 +1311,8 @@ print (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag)
           || RECORDP (obj)))                              \
    || (! NILP (Vprint_gensym)                             \
        && SYMBOLP (obj)                                           \
-       && !SYMBOL_INTERNED_P (obj)))
+       && !SYMBOL_INTERNED_P (obj)                        \
+       && !hash_unused_entry_key_p (obj)))
 
 /* The print preprocess stack, used to traverse data structures.  */