From 2288fbc1a6e96f98178d4bdc09aac4c34916039f Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 8 Nov 2016 21:03:05 -0800 Subject: 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. --- lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib.c b/lib.c index b45547b3..8f1ca8c4 100644 --- a/lib.c +++ b/lib.c @@ -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; -- cgit v1.2.3