# New Ticket Created by  chromatic 
# Please include the string:  [perl #46761]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=46761 >


There's a segfault in t/dynpmc/dynlexpad_2.pir with the gcdebug core.  It 
happens at the end of the program, during global destruction, when trying to 
call the destroy() entry on the DynLexPad PMC.

The problem is that the pointer points to unmapped memory.

This is because ParrotLibrary's destroy() entry unloads a shared library with 
Parrot_dlclose().  If this happens before a dynpmc that uses that shared 
library gets destroyed, all of the pointers to C code in that shared library 
will be invalid, and Parrot will crash when it tries to dereference them.

I'm not sure what the right solution is.  I suppose we could walk the arenas 
backwards during global destruction, but that's sort of a workaround for the 
fact that ParrotLibrary is a dependency for other types of PMCs.

-- c

Reply via email to