On Fri, Sep 23, 2005 at 11:40:09AM +0100, Brian Candler wrote: > On Fri, Sep 23, 2005 at 03:07:59AM -0700, Yitzchak Scott-Thoennes via RT > wrote: > > > Interesting. Unfortunately, this regexp still crashes perl 5.8.7 with a bu > > > error with my test case. Maybe it's because of the (x*)* construct?
Eh, there's no (x*)* construct. What's between the parens cannot be an empty string - it's an (xy*)* construct. > > Try instead: /"[^"\\]*(?>\\.[^"\\]*)*"/s > > Nice idea. I anchored it by adding a ^ at the front. Unfortunately it > doesn't work; it still dumps core with the test program I posted. Strange. For me, changing the (?: to (?> makes the difference between a core dump, and not a core dump. I also don't get a core dump on 5.005_04 or earlier. But it dumps core from 5.6.0 onwards, including blead. Replacing (?: with (?> dumps core for me on 5.9.2, but not on 5.9.0 or 5.9.1. It dumps core on 5.8.0, but not on 5.8.[1-7]. 5.6.* and 5.005_* run problem free for me as well. A threaded version of perl5.8.7 dumps core on me though. I guess different versions of perl use slightly more or less memory, which sometimes pushes it over the limit, and sometimes it manages to stay just below the limit. Abigail
pgpjQPUFNVVq8.pgp
Description: PGP signature