develooper Front page | perl.perl5.porters | Postings from August 2001

Re: [ID 20010811.006] re_eval: logical leaks

Thread Previous
From:
Jarkko Hietaniemi
Date:
August 15, 2001 06:33
Subject:
Re: [ID 20010811.006] re_eval: logical leaks
Message ID:
20010815083230.I10151@chaos.wustl.edu
On Wed, Aug 15, 2001 at 10:33:49AM +0100, Hugo van der Sanden wrote:
> I wrote:
> :perl -Dr -we '"ab" =~ /^(a(??{"(?!)"})|a(?{1}))b/'
> :suggests that 'logical' is not correctly restored on backtracking.
> 
> Attached patch on @11663 fixes it. Should also be applicable to 5.6.*.
> 
> Hugo
> --- regexec.c.old	Sat Aug  4 20:16:00 2001
> +++ regexec.c	Wed Aug 15 10:27:21 2001
> @@ -2625,6 +2625,7 @@
>  		    /* XXXX This is too dramatic a measure... */
>  		    PL_reg_maxiter = 0;
>  
> +		    logical = 0;
>  		    sayNO;
>  		}
>  		sw = SvTRUE(ret);

Thanks, applied.

> --- t/op/re_tests.old	Thu May 17 19:32:35 2001
> +++ t/op/re_tests	Wed Aug 15 10:26:16 2001
> @@ -789,3 +789,4 @@
>  (abc)?(abc)+	abc	y	$1:$2	:abc	-
>  'b\s^'m	a\nb\n	n	-	-
>  \ba	a	y	-	-
> +^(a(??{"(?!)"})|(a)(?{1}))b	ab	y	$2	a	# [ID 20010811.006]

-- 
$jhi++; # http://www.iki.fi/jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About