develooper Front page | perl.perl5.porters | Postings from May 2008

[perl #37076] threads + 'require IO' causes segmentation fault

From:
Bram via RT
Date:
May 25, 2008 02:23
Subject:
[perl #37076] threads + 'require IO' causes segmentation fault
Message ID:
rt-3.6.HEAD-11257-1211666861-558.37076-15-0@perl.org
On Mon Sep 05 01:42:51 2005, ikegami@ni.aist.go.jp wrote:
> This is a bug report for perl from ikegami@p06cmp000.asc.hpcc.jp,
> generated with the help of perlbug 1.35 running under perl v5.8.7.
> 
> 
> -----------------------------------------------------------------
> [Please enter your report here]
> 
> On dual Opteron (2 GHz) machine, perl 5.8.7 frequently causes
> segmentation fault with the following code snippet.
> 
>         #!/usr/bin/perl
>         use threads;
>         use threads::shared;
> 
>         sub socket () {
>           require IO;
>           return;
>         }
> 
>         my $s = new threads \&socket;
>         my $c = new threads \&socket;
> 
>         $s->join;
>         $c->join;
> 
> It is not reproducible by 100 %, and may not be reproducible on
> slow/single-processor machines.  As a workaround, put 'use IO'
> somewhere.  A stack trace taken from core file follows.
> 

Re-tested this with:

perl-5.8.8: segfault
perl-5.8.x: no segfault
perl-5.10: no segfault
perl-blead: no segfault

by using:

perl -wle 'for (1 .. 5000) { system("./perl -Ilib /tmp/rt-37076.pl"); }'

So I'm assuming this got resolved.

Can someone else test as well?


Kind regards,

Bram



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