Commit 7f1813cd authored by Daniel Kochmański's avatar Daniel Kochmański
Browse files

ecl_alloc_weak_pointer: don't register immediate objects as disappearing

We have special-cased all immediate objects except ECL_T. Creating such link
leads to a segmentation fault when GC tries to dereference the pointer. Fixes #610.
parent 246f0a6d
......@@ -1448,7 +1448,7 @@ ecl_alloc_weak_pointer(cl_object o)
ecl_enable_interrupts_env(the_env);
obj->t = t_weak_pointer;
obj->value = o;
if (!ECL_FIXNUMP(o) && !ECL_CHARACTERP(o) && !Null(o)) {
if (!ECL_IMMEDIATE(o)) {
GC_GENERAL_REGISTER_DISAPPEARING_LINK((void**)&(obj->value), (void*)o);
si_set_finalizer((cl_object)obj, ECL_T);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment