On 24 July 2008 14:32, Zefram <perlbug-followup@perl.org> wrote: > # New Ticket Created by Zefram > # Please include the string: [perl #57244] > # in the subject line of all future correspondence about this issue. > # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=57244 > > > > This is a bug report for perl from zefram@fysh.org, > generated with the help of perlbug 1.35 running under perl v5.8.8. > > > ----------------------------------------------------------------- > [Please enter your report here] > > I have some horribly complicated regexps using the (??{}) facility > to parse a recursive-descent grammar. (Actually the real application > is parsing a subset of Perl expression syntax.) I'm getting crashes, > mostly in the form of libc's malloc detecting corruption and aborting. > Using valgrind I've narrowed things down, and here's my minimal test case: > > $ cat x1.pl > use re "eval"; > my $dqstring_rx = qr/"(?:[^"\\]+|\\(?:e|x\{([0-9a-fA-F]+)\}))*"/; > my $sqstring_rx = qr/'(?:aaa|bbb)'/; > my $string_rx = qr/$dqstring_rx|$sqstring_rx/o; > my $array_rx = qr/\[(??{$datum_rx}),*\]/o; > my $datum_rx = qr/$string_rx|$array_rx/o; > "['aaa','bbb',]" =~ /\A$array_rx\z/; > $ valgrind perl x1.pl This is fixed in 5.10/blead, I think by some patches I did to (??{...}) compilation and buffer allocation. Not sure the number tho. I think this ticket can be closed as fixed in 5.10 Cheers, yves -- perl -Mre=debug -e "/just|another|perl|hacker/"Thread Previous | Thread Next