From: Hugo van der Sanden <hv@crypt.org>
Date: Mon, 15 Jul 2002 02:22:35 +0000 (+0100)
Subject: Re: Regexp causes coredump
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=075aa684ec81e9e453dcae460c5e0d15bc196a37;p=p5sagit%2Fp5-mst-13.2.git

Re: Regexp causes coredump
Message-Id: <200207150122.g6F1MZP31385@crypt.compulink.co.uk>

p4raw-id: //depot/perl@17541
---

diff --git a/regexec.c b/regexec.c
index 4f403a0..5a7ed12 100644
--- 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;
diff --git a/t/op/re_tests b/t/op/re_tests
index 7ced95c..9c5ddc4 100644
--- a/t/op/re_tests
+++ b/t/op/re_tests
@@ -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	-	-