FAQ
Andreas, could your binsearch work out when the appended code started SEGVing?

It appears to be fine in 5.8.x, but bad by 5.10.

Nicholas Clark

PS see you at http://erlangen.perlworkshop.de/

sub boom {
# bug id 20001008.001

my $test = 248;
my @x = ("stra\337e 138","stra\337e 138");
for (@x) {
s/(\d+)\s*([\w\-]+)/$1 . uc $2/e;
my($latin) = /^(.+)(?:\s+\d)/;
print $latin eq "stra\337e" ? "ok $test\n" : # 248,249
"#latin[$latin]\nnot ok $test\n";
$test++;
$latin =~ s/stra\337e/straße/; # \303\237 after the 2nd a
use utf8; # needed for the raw UTF-8
$latin =~ s!(s)tr(?:aß|s+e)!$1tr.!; # \303\237 after the a
}
}

use threads;
threads->create(\&boom)->join();

Search Discussions

  • Marcus Holland-Moritz at Jan 9, 2008 at 10:11 pm

    On 2008-01-09, at 19:55:01 +0000, Nicholas Clark wrote:

    Andreas, could your binsearch work out when the appended code started SEGVing?

    It appears to be fine in 5.8.x, but bad by 5.10.

    Nicholas Clark

    PS see you at http://erlangen.perlworkshop.de/

    sub boom {
    # bug id 20001008.001

    my $test = 248;
    my @x = ("stra\337e 138","stra\337e 138");
    for (@x) {
    s/(\d+)\s*([\w\-]+)/$1 . uc $2/e;
    my($latin) = /^(.+)(?:\s+\d)/;
    print $latin eq "stra\337e" ? "ok $test\n" : # 248,249
    "#latin[$latin]\nnot ok $test\n";
    $test++;
    $latin =~ s/stra\337e/straße/; # \303\237 after the 2nd a
    use utf8; # needed for the raw UTF-8
    $latin =~ s!(s)tr(?:aß|s+e)!$1tr.!; # \303\237 after the a
    }
    }

    use threads;
    threads->create(\&boom)->join();
    ----Output of .../pgdA1qb/perl-5.8.0@30745/bin/perl----
    ok 248
    ok 249

    ----EOF ($?='0')----
    ----Output of .../p169Pi3/perl-5.8.0@30778/bin/perl----

    ----EOF ($?='11')----
    Need a perl between 30745 and 30778

    I'll follow up when it's finished.

    Marcus

    --
    QOTD:
    On a scale of 1 to 10 I'd say... oh, somewhere in there.
  • Marcus Holland-Moritz at Jan 9, 2008 at 10:58 pm
    Hello Marcus,
    On 2008-01-09, at 23:10:49 +0100, Marcus Holland-Moritz wrote:
    On 2008-01-09, at 19:55:01 +0000, Nicholas Clark wrote:

    Andreas, could your binsearch work out when the appended code started SEGVing?

    It appears to be fine in 5.8.x, but bad by 5.10.

    Nicholas Clark

    PS see you at http://erlangen.perlworkshop.de/

    sub boom {
    # bug id 20001008.001

    my $test = 248;
    my @x = ("stra\337e 138","stra\337e 138");
    for (@x) {
    s/(\d+)\s*([\w\-]+)/$1 . uc $2/e;
    my($latin) = /^(.+)(?:\s+\d)/;
    print $latin eq "stra\337e" ? "ok $test\n" : # 248,249
    "#latin[$latin]\nnot ok $test\n";
    $test++;
    $latin =~ s/stra\337e/straße/; # \303\237 after the 2nd a
    use utf8; # needed for the raw UTF-8
    $latin =~ s!(s)tr(?:aß|s+e)!$1tr.!; # \303\237 after the a
    }
    }

    use threads;
    threads->create(\&boom)->join();
    ----Output of .../pgdA1qb/perl-5.8.0@30745/bin/perl----
    ok 248
    ok 249

    ----EOF ($?='0')----
    ----Output of .../p169Pi3/perl-5.8.0@30778/bin/perl----

    ----EOF ($?='11')----
    Need a perl between 30745 and 30778

    I'll follow up when it's finished.
    ----Output of .../pBQVFAg/perl-5.8.0@30754/bin/perl----
    ok 248
    ok 249

    ----EOF ($?='0')----
    ----Output of .../pDegODZ/perl-5.8.0@30755/bin/perl----

    ----EOF ($?='11')----

    --
    I have to do some "real work" now, so don't write anything interesting. :-)
    --Larry Wall
  • Nicholas Clark at Jan 9, 2008 at 11:27 pm

    On Wed, Jan 09, 2008 at 11:58:03PM +0100, Marcus Holland-Moritz wrote:

    ----Output of .../pBQVFAg/perl-5.8.0@30754/bin/perl----
    ok 248
    ok 249

    ----EOF ($?='0')----
    ----Output of .../pDegODZ/perl-5.8.0@30755/bin/perl----

    ----EOF ($?='11')----
    Fixed with change 32932

    I'm still no nearer on working out what is up with that use re 'eval'; error.

    Nicholas Clark

    Change 32932 by nicholas@nicholas-pecuchet on 2008/01/09 23:26:14

    Fix the bug introduced by the bug fix of change 30755.
    (Certain regexps could SEGV if cloned).

    Affected files ...

    ... //depot/perl/regcomp.c#646 edit
    ... //depot/perl/t/op/pat.t#303 edit

    Differences ...

    ==== //depot/perl/regcomp.c#646 (text) ====

    @@ -9409,7 +9409,9 @@
    /* Do it this way to avoid reading from *r after the StructCopy().
    That way, if any of the sv_dup_inc()s dislodge *r from the L1
    cache, it doesn't matter. */
    - const bool anchored = r->check_substr == r->anchored_substr;
    + const bool anchored = r->check_substr
    + ? r->check_substr == r->anchored_substr
    + : r->check_utf8 == r->anchored_utf8;
    Newx(ret->substrs, 1, struct reg_substr_data);
    StructCopy(r->substrs, ret->substrs, struct reg_substr_data);

    @@ -9432,6 +9434,12 @@
    ret->check_substr = ret->float_substr;
    ret->check_utf8 = ret->float_utf8;
    }
    + } else if (ret->check_utf8) {
    + if (anchored) {
    + ret->check_utf8 = ret->anchored_utf8;
    + } else {
    + ret->check_utf8 = ret->float_utf8;
    + }
    }
    }


    ==== //depot/perl/t/op/pat.t#303 (xtext) ====

    @@ -1297,10 +1297,7 @@
    print "not " unless "\x{abcd}" =~ /\x{abcd}/;
    print "ok 247\n";

    -if ($::running_as_thread) {
    - print "not ok 248 # TODO & SKIP: SEGVs in 5.10 when threaded\n";
    - print "not ok 249 # TODO & SKIP: SEGVs in 5.10 when threaded\n";
    -} else {
    +{
    # bug id 20001008.001

    $test = 248;
  • Richard Foley at Jan 10, 2008 at 7:42 am

    On Wednesday 09 January 2008 20:55, Nicholas Clark wrote:
    Andreas, could your binsearch work out when the appended code started SEGVing?
    It appears to be fine in 5.8.x, but bad by 5.10.

    Nicholas Clark

    PS see you at http://erlangen.perlworkshop.de/
    From the website:

    Diese Webseiten dienen nur dem Zurechtfinden während des Perlworkshops 2008 in
    Erlangen und werden danach wieder im Nirvana verschwinden. Hauptseite für den
    Deutschen Perlworkshop ist...

    Which means, "this website will shortly disappear into Nirvana and from now on
    you should the following url for the German Perl Workshop"

    http://www.perl-workshop.de

    Or, after an English redirect:

    http://www.perl-workshop.de/en/2008/index.html

    Cheers ;-)

    --
    Richard Foley
    Ciao - shorter than aufwiedersehen

    http://www.rfi.net/

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupperl5-porters @
categoriesperl
postedJan 9, '08 at 7:55p
activeJan 10, '08 at 7:42a
posts5
users3
websiteperl.org

People

Translate

site design / logo © 2022 Grokbase