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

[perl #29939] threads::shared use of XSLoader breaks Devel::DProf

Thread Next
May 28, 2004 17:25
[perl #29939] threads::shared use of XSLoader breaks Devel::DProf
Message ID:
# New Ticket Created by  Norbert 
# Please include the string:  [perl #29939]
# in the subject line of all future correspondence about this issue. 
# <URL: >

This is a bug report for perl from,
generated with the help of perlbug 1.35 running under perl v5.8.4.

I can't run the Devel::DProf profiler on any script that uses 
threads/, because that lib loads itself using
XSLoader::load().  This function is written such that it bumps
up against a DProf bug, whereby it chokes on subroutines that
end with a last, goto, or next.  In

>From XSLoader::load:
    # See comment block above
    return &$xs(@_);

    require DynaLoader;
    goto &DynaLoader::bootstrap_inherit;

The result:
% ~/bin/perl-5.8.4/bin/perl -d:DProf ~/tmp/
panic: Devel::DProf inconsistent subroutine return at /usr/bcstrong/bin/perl-5.8.4/lib/5.8.4/i686-linux-thread-multi/threads/ line 18.
BEGIN failed--compilation aborted at /usr/bcstrong/bin/perl-5.8.4/lib/5.8.4/i686-linux-thread-multi/threads/ line 35.
Compilation failed in require at /usr/bcstrong/tmp/ line 5.
BEGIN failed--compilation aborted at /usr/bcstrong/tmp/ line 5.

Predictably, if I comment out "use threads::shared" (plus 
any shared variable declarations), it runs fine.

I suppose that if this problem is going to be fixed in DProf 
then this is just a duplicate bug, but I would suggest that 
this issue increases the severity, since the major question 
marks about ithreads seems to revolve around memory usage, 
which DProf is useful for checking.

Site configuration information for perl v5.8.4:

Configured by bcstrong at Mon May 24 14:47:16 PDT 2004.

Summary of my perl5 (revision 5 version 8 subversion 4) configuration:
    osname=linux, osvers=2.4.9-45lxset12smp, archname=i686-linux-thread-multi
    uname='linux plxc3752 2.4.9-45lxset12smp #1 smp tue jan 27 00:35:25 pst 2004 i686 unknown '
    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
    cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -fno-strict-aliasing -I/usr/local/include -I/usr/include/gdbm'
    ccversion='', gccversion='2.96 20000731 (Red Hat Linux 7.1 2.96-85)', 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 -lndbm -lgdbm -ldl -lm -lcrypt -lutil -lpthread -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
    libc=/lib/, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:

@INC for perl v5.8.4:

Environment for perl v5.8.4:
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PERL_BADLANG (unset)

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About