diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-11-08 21:03:05 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-11-08 21:03:05 -0800 |
commit | 3ccdd5c9bfc6c8a8812ef6dab12dc1a1cd2bc0ee (patch) | |
tree | 7e6cd8395223e4b7e50d606531331e43b4f7d044 | |
parent | 9ad8bad3e65de0181fe4662ec5687738ae49087c (diff) | |
download | txr-3ccdd5c9bfc6c8a8812ef6dab12dc1a1cd2bc0ee.tar.gz txr-3ccdd5c9bfc6c8a8812ef6dab12dc1a1cd2bc0ee.tar.bz2 txr-3ccdd5c9bfc6c8a8812ef6dab12dc1a1cd2bc0ee.zip |
Don't access *print-circle* in early init.
* lib.c (obj_print): Check that print_circle_s has
been interned before trying to look it up as a variable.
Otherwise the auto-load code will be triggered, and try to use
a hash table that doesn't exist yet. This can happen when
this code is called during early initialization.
-rw-r--r-- | lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -9631,7 +9631,7 @@ val obj_print(val obj, val out, val pretty) ctx->obj_hash = ctx->obj_hash_prev; ctx->obj_hash_prev = nil; } else { - if (cdr(lookup_var(nil, print_circle_s))) { + if (print_circle_s && cdr(lookup_var(nil, print_circle_s))) { ctx = &ctx_struct; ctx->obj_hash = make_hash(nil, nil, nil); ctx->obj_hash_prev = nil; |