# New Ticket Created by  John Gardiner Myers 
# Please include the string:  [perl #31838]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=31838 >


This is a bug report for perl from [EMAIL PROTECTED],
generated with the help of perlbug 1.35 running under perl v5.8.5.


-----------------------------------------------------------------
[Please enter your report here]

The following test program crashes on a multiprocessor box.

Removing either the line that sets $g_bar or the call to
utf8:upgrade() makes the crash go away.

use threads;

my $g_foo = "abcd\n";

my $g_bar;
($g_bar) = $g_foo =~ /(.*)/;

sub init {
    my $thr;

    for (my $i = 0; $i < 8; $i++) {
        $thr = threads->new(\&task);
    }

    foreach $thr (threads->list) {
        if ($thr->tid && !threads::equal($thr, threads->self)) {
            $thr->join;
        }
    }
}

sub task {
    print "task starting\n";
    for (my $i = 1; $i < 10000; $i++) {
        my $str = "foo=bar baz\n";
        utf8::upgrade($str);
        if ($str =~ /^([^=]+)=(.*)$/) {
            my $a = $1;
        }
        if ($str =~ /^(foo)(\w*)/) {
            my $a = $1;
        }
    }
}

init();




[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=medium
---
Site configuration information for perl v5.8.5:

Configured by jgmyers at Tue Sep 28 10:04:28 PDT 2004.

Summary of my perl5 (revision 5 version 8 subversion 5) configuration:
  Platform:
    osname=linux, osvers=2.4.21-20.elsmp, archname=i686-linux-thread-multi
    uname='linux pong 2.4.21-20.elsmp #1 smp wed aug 18 20:46:40 edt 
2004 i686 i686 i3
86 gnulinux '
    config_args=''
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define 
usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS 
-DDEBUGGING -fn
o-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=6
4 -I/usr/include/gdbm',
    optimize='-g',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING 
-fno-strict-a
liasing -pipe -I/usr/local/include -I/usr/include/gdbm'
    ccversion='', gccversion='3.3.3', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', 
lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    libc=/lib/libc-2.3.2.so, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version='2.3.2'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E 
-Wl,-rpath,/u/jgm
yers/perl/lib/5.8.5/i686-linux-thread-multi/CORE'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:
    

---
@INC for perl v5.8.5:
    /u/jgmyers/perl/lib/5.8.5/i686-linux-thread-multi
    /u/jgmyers/perl/lib/5.8.5
    /u/jgmyers/perl/lib/site_perl/5.8.5/i686-linux-thread-multi
    /u/jgmyers/perl/lib/site_perl/5.8.5
    /u/jgmyers/perl/lib/site_perl/5.8.3/i686-linux-thread-multi
    /u/jgmyers/perl/lib/site_perl/5.8.3
    /u/jgmyers/perl/lib/site_perl
    .

---
Environment for perl v5.8.5:
    HOME=/u/jgmyers
    LANG=en_US
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    
PATH=/tools/x/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/u
/jgmyers/bin
    PERL_BADLANG (unset)
    SHELL=/bin/bash

Reply via email to