Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

sky (1411)

  (email not shown publicly)

sky on IRC

Journal of sky (1411)

Friday May 25, 2001
09:41 AM

Regex sadness

[ #209 ]
Dan Sugalski correctly pointed out that I was triggering different opcodes in the different subs. Here is a test that shows a correct example:

sub foo {
    my $re = shift;
    my $valid = shift;
    for(1..$i) {
        $foo =~/$re/;
        print "error $1 is not $valid\n" if($1 ne $valid);
push @threads, IThread->create(\&foo,'(.)','b');
push @threads, IThread->create(\&foo,'.(.)','a');
push @threads, IThread->create(\&foo,'..(.)','r');

And BOOM SEGFAULT. :( Need to look at this in the weekend.
Thanks Dan!