CC-ing the list. > So if I understand it correctly, Variable::Magic has been made to work > under threads by making use of the thread's ptr_table, which is kept > around after a new thread is created. However, fork() under windows is > emulated by using the same threading mechanism that threads.pm uses but > it doesn't keep the ptr_table around (and never has). Variable::Magic > can't distinguish between a thread clone and a fork clone, and assumes > that the ptr_table is always around, and thus explodes. Yes, exactly. Variable::Magic stores coderefs in a thread local context. When a new interpreter is cloned, it needs to relink the old pointers to their cloned counterparts. Hence it relies on hitting the pointer table in CLONE. > > 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. Vincent.