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.
This commit is contained in:
parent
246f0a6d86
commit
7f1813cd93
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue