Front page | perl.perl5.porters |
Postings from November 2008
[perl #29650] Perl 5.8.3/5.8.4 - ithreads - solaris 5.8 -libpthread - reg.exp seg. fault.
From:
Steve Peters via RT
Date:
November 25, 2008 06:29
Subject:
[perl #29650] Perl 5.8.3/5.8.4 - ithreads - solaris 5.8 -libpthread - reg.exp seg. fault.
Message ID:
rt-3.6.HEAD-15189-1227586940-1363.29650-15-0@perl.org
On Mon May 17 03:53:23 2004, rafiq@joshua.dreamthought.com wrote:
> Hi All,
>
> I discovered a bug whilst trying to use template toolkit under a
> threaded
> mod_perl environment. This seg fault didn't occur when tested against
> a
> perl without ithreads. I managed to trace the flaw down to one
> regular
> expression. On the suggestion of Perrin Harkins off the modperl list,
> I'm
> submitting this as a bug. Not sure if it is, but it appears so. I've
> attached a quick sample script which simulates what happens in the
> template module where it seg. faults. With this there is an example
> template which is simply read into a variable and matched against the
> expression.
>
> The syntax for running this would be perl -w ./thtest.pl ./index.html;
> you
> can rewrite the paths for yourselves. I find that it only seg. faults
> on
> files where it seems to match.
>
> Tested with both perl 5.8.3 and 5.8.4, although I'll just include the
> output from 5.8.4 which I built with -DDEBUGGING:
>
> =head2 perl -V
>
> [rafiq@hobbes:rafiq][2]$ perl -V
> Summary of my perl5 (revision 5 version 8 subversion 4) configuration:
> Platform:
> osname=solaris, osvers=2.8, archname=sun4-solaris-thread-multi
> uname='sunos hobbes 5.8 generic_108528-15 sun4u sparc
> sunw,sun-blade-100 '
> config_args='-Ubincompat5005 -DDEBUGGGING'
> 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 -fno-strict-aliasing
> -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
> optimize='-O',
> cppflags='-D_REENTRANT -fno-strict-aliasing -I/usr/local/include'
> ccversion='', gccversion='3.3', gccosandvers='solaris2.8'
> intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
> d_longlong=define, longlongsize=8, d_longdbl=define,
> longdblsize=16
> ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
> lseeksize=8
> alignbytes=8, prototype=define
> Linker and Libraries:
> ld='gcc', ldflags =' -L/usr/local/lib '
> libpth=/usr/local/lib /usr/lib /usr/ccs/lib
> libs=-lsocket -lnsl -lgdbm -ldl -lm -lpthread -lc
> perllibs=-lsocket -lnsl -ldl -lm -lpthread -lc
> libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
> gnulibc_version=''
> Dynamic Linking:
> dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
> cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib'
>
>
> Characteristics of this binary (from libperl):
> Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES
> PERL_IMPLICIT_CONTEXT
> Built under solaris
> Compiled at May 17 2004 11:04:03
> %ENV:
> PERL_INLINE_JAVE_JNI="1"
> @INC:
> /usr/local/perl-5.8.4/lib
> /usr/local/perl-5.8.4/lib
> /usr/local/perl-5.8.4/lib
> /usr/local/perl-5.8.4/lib
> /appl/awgmdb/perl/lib
> /appl/awgmdb/perl-5.8.3/lib
> /appl/twgmdb/perl/lib
> /appl/twgmdb/perl-5.8.3/lib
> /appl/pwgmdb/perl/lib
> /appl/pwgmdb/perl-5.8.3/lib
> /appl/fwgmdb/perl/lib
> /appl/fwgmdb/perl-5.8.3/lib
> /appl/aagmdb/perl/lib
> /appl/aagmdb/perl-5.8.3/lib
> /appl/tagmdb/perl-5.8.3/lib
> /appl/tagmdb/perl/lib
> /appl/pagmdb/perl-5.8.3/lib
> /appl/pagmdb/perl/lib
> /appl/fagmdb/perl-5.8.3/lib
> /appl/fagmdb/perl/lib
> /usr/zlocal/perl-5.8.3/lib
> /usr/zlocal/perl/lib
> .
>
> =cut
>
> =head2 appropriate bit of back trace
>
> Segmentation Fault (core dumped)
> [rafiq@hobbes:rafiq][1]$ gdb `which perl` ./core
> GNU gdb 6.0
> Copyright 2003 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and
> you are
> welcome to change it and/or distribute copies of it under certain
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB. Type "show warranty" for
> details.
> This GDB was configured as "sparc-sun-solaris2.8"...
> Core was generated by `perl -w ./thtest.pl
> /home/rafiq/Projects/gmdbsite/html/index.html'.
> Program terminated with signal 11, Segmentation fault.
> Reading symbols from /lib/libsocket.so.1...done.
> Loaded symbols for /lib/libsocket.so.1
> Reading symbols from /lib/libnsl.so.1...done.
> Loaded symbols for /lib/libnsl.so.1
> Reading symbols from /lib/libdl.so.1...done.
> Loaded symbols for /lib/libdl.so.1
> Reading symbols from /lib/libm.so.1...done.
> Loaded symbols for /lib/libm.so.1
> Reading symbols from /lib/libpthread.so.1...done.
> Loaded symbols for /lib/libpthread.so.1
> Reading symbols from /lib/libc.so.1...done.
> Loaded symbols for /lib/libc.so.1
> Reading symbols from /lib/libmp.so.2...done.
> Loaded symbols for /lib/libmp.so.2
> Reading symbols from
> /usr/platform/SUNW,Sun-Blade-100/lib/libc_psr.so.1...done.
> Loaded symbols for /usr/platform/SUNW,Sun-Blade-100/lib/libc_psr.so.1
> Reading symbols from /lib/libthread.so.1...done.
> Loaded symbols for /lib/libthread.so.1
> Reading symbols from
> /usr/local/perl-5.8.4/lib/auto/threads/threads.so...done.
> Loaded symbols for /usr/local/perl-5.8.4/lib/auto/threads/threads.so
> #0 0x000e2644 in S_reginclass ()
> (gdb) bt
> #0 0x000e2644 in S_reginclass ()
> Cannot access memory at address 0xfec09f84
> (gdb)
>
> =cut
>
> Many thanks,
>
> Rafiq
>
At some point during the past four years, this bug has been fixed. My guess is that the
"Great Regexp Engine Fix" was the likely cause. Anyways, I've had multiple Perls on multiple
machines confirm the fix, so this bug appears to be fully resolved.
-
[perl #29650] Perl 5.8.3/5.8.4 - ithreads - solaris 5.8 -libpthread - reg.exp seg. fault.
by Steve Peters via RT