Re: Regexp causes coredump
Hugo van der Sanden [Mon, 15 Jul 2002 02:22:35 +0000 (03:22 +0100)]
Message-Id: <200207150122.g6F1MZP31385@crypt.compulink.co.uk>

p4raw-id: //depot/perl@17541

regexec.c
t/op/re_tests

index 4f403a0..5a7ed12 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -2805,7 +2805,7 @@ S_regmatch(pTHX_ regnode *prog)
                CALLRUNOPS(aTHX);                       /* Scalar context. */
                SPAGAIN;
                if (SP == before)
-                   ret = Nullsv;   /* protect against empty (?{}) blocks. */
+                   ret = &PL_sv_undef;   /* protect against empty (?{}) blocks. */
                else {
                    ret = POPs;
                    PUTBACK;
index 7ced95c..9c5ddc4 100644 (file)
@@ -921,3 +921,4 @@ ab(?i)cd    abCd    y       -       -
 (.*?)(?<=[bc]) abcd    y       $1      ab
 (.*?)(?<=[bc])c        abcd    y       $1      ab
 2(]*)?$\1      2       y       $&      2
+(??{}) x       y       -       -