From: David Mitchell Date: Wed, 5 Aug 2009 13:20:29 +0000 (+0100) Subject: add CLONEf_KEEP_PTR_TABLE to win fork emulation. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=240bfeb992996de28603a7f9e3ee34ecc6e3f286;p=p5sagit%2Fp5-mst-13.2.git add CLONEf_KEEP_PTR_TABLE to win fork emulation. This keeps the ptr-table table around after the thread has been created. This has been on for user threads for a while now, but not for Windows forks. Turns out that Variable::Magic relies on the table still being there, so crashes under windows forks. This increases memory usage per fork, but stops things crashing. Sigh. [perl #66158] --- diff --git a/win32/perlhost.h b/win32/perlhost.h index c2473c9..c02d409 100644 --- a/win32/perlhost.h +++ b/win32/perlhost.h @@ -1836,7 +1836,8 @@ PerlProcFork(struct IPerlProc* piPerl) } h = new CPerlHost(*(CPerlHost*)w32_internal_host); PerlInterpreter *new_perl = perl_clone_using((PerlInterpreter*)aTHX, - CLONEf_COPY_STACKS, + CLONEf_COPY_STACKS + | CLONEf_KEEP_PTR_TABLE, h->m_pHostperlMem, h->m_pHostperlMemShared, h->m_pHostperlMemParse,