Thanks for this. > On Wed, Aug 05, 2009 at 03:16:05PM +0200, Vincent Pit wrote: >> > The thing that puzzles me is that is doesn't explode on 5.8.x. >> >> I've no idea about why it works with 5.8, nor why the pointer table is >> flushed for the fork emulation but not for threads. Now I know why it doesn't crash on 5.8 : I explicitely disabled Variable::Magic thread safety for those. > That was a change to threads.xs a while ago. Originally neither kept the > table around - its an expensive use of memory (at least 12 bytes per SV > etc per thread). threads.pm manually destroys the pointer table after the new interpreter is created. It should theorically be fine to just shove a ptr_table_free(PL_ptr_table) right after the call to perl_clone_using() in PerlProcFork(). The pointer table has to be alive when CLONE is called, not after. Vincent.