"Will Coleda" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
>
> As of r26037, tcl is once again generating a segfault (even on
> feather!). The change in 26037 was to replace a morph + assign with
> the 'copy' opcode.
>

This is indeed a problem caused by the copy op.

Examining the code in src/ops/set.ops we see that VTABLE_destroy(interp, $1) 
is called, which in turn calls mem_sys_free(PMC_data(pmc)).
Thus, the PMC_data, which is the actual "object guts" has been freed before 
the call to VTABLE_morph(interp, $1, type).
This calls the generic object morph function, which uses the aforementioned 
guts to dispatch to the appropriate class function - oops!

As a workaround for now, I suggest commenting out the call to 
VTABLE_destroy, which will cause memory leaks but not segfaults. I will work 
on a proper solution later tonight if nobody beats me to it.

Regards
Peter Gibbs 


Reply via email to