Fix for a parsing bug, not for the original bug.
Spider Boardman [Wed, 13 Sep 2000 17:52:20 +0000 (13:52 -0400)]
Subject: Re: [ID 20000910.005] Another segfault with regexes.
Message-Id: <200009132152.RAA24029@leggy.zk3.dec.com>

p4raw-id: //depot/perl@7076

regcomp.c

index c60ab84..b0fd6da 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -1963,7 +1963,10 @@ S_reg(pTHX_ I32 paren, I32 *flagp)
                    else
                        sv = newSVpvn("", 0);
 
+                   ENTER;
+                   Perl_save_re_context(aTHX);
                    rop = sv_compile_2op(sv, &sop, "re", &av);
+                   LEAVE;
 
                    n = add_data(3, "nop");
                    PL_regcomp_rx->data->data[n] = (void*)rop;