[5.8.x segfault + patch] chicken&egg segfault in -Dm -Mthreads
Stas Bekman [Wed, 29 Oct 2003 15:15:15 +0000 (07:15 -0800)]
Message-ID: <3FA04A03.5010603@stason.org>
(enclosed in a #ifdef DEBUGGING)

p4raw-id: //depot/perl@21589

sv.c

diff --git a/sv.c b/sv.c
index a57ed71..bef60fa 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -10921,6 +10921,9 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
     PL_debug           = proto_perl->Idebug;
 
 #ifdef USE_REENTRANT_API
+#ifdef DEBUGGING
+    PERL_SET_CONTEXT(proto_perl);
+#endif
     Perl_reentrant_init(aTHX);
 #endif