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

Perlbug 19990906.001 - segfault on long escaped quote regex

Thread Next
From:
Michael G Schwern
Date:
October 29, 2001 20:01
Subject:
Perlbug 19990906.001 - segfault on long escaped quote regex
Message ID:
20011029230108.G18053@blackrider
This bug appeared in 5.005_61, is still there in 5.6.0, disappeared in
5.6.1 came back around bleadperl 12493 and is gone again in 12773.


(From perlbug 19990906.001)
> $line = ('a' x 99999) . ";'"; . ('a' x 20000);
> $line =~ m";(?:\s*\'(?:[^\\']|\\.)*\'\s*)";;
> 
> (in other words, if one is looking for a single string with possible
> escaped single quotes
> and the search fails on a long string, it cores..).
> 
> Ed


Below is a patch to t/run/kill_perl.t to ensure it doesn't creep in
again.

Bug closed.


--- t/run/kill_perl.t	2001/10/30 03:31:32	1.1
+++ t/run/kill_perl.t	2001/10/30 03:32:22
@@ -809,3 +809,9 @@
 EXPECT
 Can't modify constant item in read at - line 1, near "1)"
 Execution of - aborted due to compilation errors.
+######## [ID 19990906.001]
+$line = ('a' x 99999) . ";'"; . ('a' x 20000);
+$line =~ m";(?:\s*\'(?:[^\\']|\\.)*\'\s*)";;
+print "ok\n";
+EXPECT
+ok


-- 

Michael G. Schwern   <schwern@pobox.com>    http://www.pobox.com/~schwern/
Perl6 Quality Assurance     <perl-qa@perl.org>	     Kwalitee Is Job One
<Skrewtape> I've heard that semen tastes different depending on diet.  Is that
	    true?
<Skrewtape> Hello?
<Schwern> Skrewtape:  Hang on, I'm conducting research.

Thread Next


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