Here is another segfault caused by Devel::Leak by seems to be more like a core issue.

(please let me know if it's preferrable to submit those through rt)

#!/usr/bin/perl -T
use Devel::Leak;
use threads;
use threads::shared;

my $handle : shared;

sub CLONE {
    Devel::Leak::NoteSV($handle);
}

sub END {
   # warn "running end";
    Devel::Leak::CheckSV($handle);
}

my $thr = threads->new(sub { 1 });
$thr->join;        # <== XXX: triggers the leak

% perl-5.8.7-ithread -T /tmp/leak
....
segfault

the trace:


#0 0x40096d92 in Perl_do_magic_dump (my_perl=0x804c008, level=0,
file=0x805f134, mg=0x18, nest=0, maxnest=0, dumpops=0 '\0', pvlim=0)
at dump.c:825
825 if (mg->mg_virtual) {
(gdb) bt
#0 0x40096d92 in Perl_do_magic_dump (my_perl=0x804c008, level=0,
file=0x805f134, mg=0x18, nest=0, maxnest=0, dumpops=0 '\0', pvlim=0)
at dump.c:825
#1 0x40098666 in Perl_do_sv_dump (my_perl=0x804c008, level=0, file=0x805f134,
sv=0x815fe64, nest=0, maxnest=0, dumpops=0 '\0', pvlim=0) at dump.c:1190
#2 0x40099aff in Perl_sv_dump (my_perl=0x804c008, sv=0x815fe64) at dump.c:1416
#3 0x4038110d in LangDumpVec (who=0x403838a8 "old", count=1, data=0x81869e4)
at Leak.xs:33
#4 0x403815cb in check_used (x=0xbfffee0c) at Leak.xs:170
#5 0x40381c15 in XS_Devel__Leak_CheckSV (my_perl=0x804c008, cv=0x806ad90)
at Leak.xs:201
#6 0x400bd868 in Perl_pp_entersub (my_perl=0x804c008) at pp_hot.c:2888
#7 0x40099ce1 in Perl_runops_debug (my_perl=0x804c008) at dump.c:1449
#8 0x4003d012 in S_call_body (my_perl=0x804c008, myop=0xbffff030, is_eval=0)
at perl.c:2324
#9 0x4003cb3e in Perl_call_sv (my_perl=0x804c008, sv=0x81047c4, flags=6)
at perl.c:2242
#10 0x400419fa in S_call_list_body (my_perl=0x804c008, cv=0x81047c4)
at perl.c:4777
#11 0x4004151b in Perl_call_list (my_perl=0x804c008, oldscope=1,
paramList=0x8104830) at perl.c:4706
---Type <return> to continue, or q <return> to quit---
#12 0x40038610 in perl_destruct (my_perl=0x804c008) at perl.c:521
#13 0x080494d7 in main (argc=3, argv=0xbffff364, env=0xbffff374)
at perlmain.c:100



*this is maint perl 5.8.7-to-be*

% perl-5.8.7-ithread -V
Summary of my perl5 (revision 5 version 8 subversion 6) configuration:
Platform:
osname=linux, osvers=2.6.8.1-12mdk, archname=i686-linux-thread-multi
uname='linux rabbit.stason.org 2.6.8.1-12mdk #1 fri oct 1 12:53:41 cest 2004 i686 mobile intel(r) pentium(r) 4 - m cpu 2.00ghz unknown gnulinux '
config_args='-des -Dprefix=/home/stas/perl/5.8.7-ithread -Dusethreads -Doptimize=-g -Duseshrplib -Dusedevel -Accflags=-DDEBUG_LEAKING_SCALARS'
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='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUG_LEAKING_SCALARS -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
optimize='-g',
cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUG_LEAKING_SCALARS -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -I/usr/include/gdbm'
ccversion='', gccversion='3.4.1 (Mandrakelinux 10.1 3.4.1-4mdk)', 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='cc', 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.3.so, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version='2.3.3'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/home/stas/perl/5.8.7-ithread/lib/5.8.6/i686-linux-thread-multi/CORE'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'



Characteristics of this binary (from libperl):
Compile-time options: DEBUGGING MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL_IMPLICIT_CONTEXT
Locally applied patches:
MAINT23940
Built under linux
Compiled at Mar 3 2005 21:58:32
%ENV:
PERLDOC_PAGER="less -R"
@INC:
/home/stas/perl/5.8.7-ithread/lib/5.8.6/i686-linux-thread-multi
/home/stas/perl/5.8.7-ithread/lib/5.8.6
/home/stas/perl/5.8.7-ithread/lib/site_perl/5.8.6/i686-linux-thread-multi
/home/stas/perl/5.8.7-ithread/lib/site_perl/5.8.6
/home/stas/perl/5.8.7-ithread/lib/site_perl
.


--
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Reply via email to