FAQ
# New Ticket Created by stsc@refcnt.org
# Please include the string: [perl #94510]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=94510 >



This is a bug report for perl from stsc@refcnt.org,
generated with the help of perlbug 1.39 running under perl 5.15.0.


-----------------------------------------------------------------
[Please describe your issue here]

[guest@testing ~]$ ./perl-7b70e81 -e 'AUTOLOAD { bless {} }; __PACKAGE__->method'
Segmentation fault

Reproducible with 5.004_05, 5.005_04, 5.6.2, 5.8.9, 5.10.0, 5.10.1,
5.12.2, 5.12.3, 5.14.0 and blead.

Attached the output of valgrind and gdb.

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=high
---
Site configuration information for perl 5.15.0:

Configured by guest at Mon Jul 11 09:36:23 CEST 2011.

Summary of my perl5 (revision 5 version 15 subversion 0) configuration:
Snapshot of: 7b70e8177801df4e142684870ce037d584f72e7b
Platform:
osname=linux, osvers=2.6.32-5-openvz-686, archname=i686-linux-thread-multi
uname='linux testing 2.6.32-5-openvz-686 #1 smp tue mar 8 23:30:33 utc 2011 i686 gnulinux '
config_args='-des -Dusedevel -Dusethreads -Doptimize=-g3 -Dprefix=/home/guest/perl/perl-7b70e81'
hint=recommended, useposix=true, d_sigaction=define
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 -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-g3',
cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
ccversion='', gccversion='4.4.5', 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 =' -fstack-protector -L/usr/local/lib'
libpth=/usr/local/lib /lib/../lib /usr/lib/../lib /lib /usr/lib
libs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
libc=/lib/libc-2.11.2.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.11.2'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -g3 -L/usr/local/lib -fstack-protector'

Locally applied patches:


---
@INC for perl 5.15.0:
/home/guest/perl/perl-7b70e81/lib/site_perl/5.15.0/i686-linux-thread-multi
/home/guest/perl/perl-7b70e81/lib/site_perl/5.15.0
/home/guest/perl/perl-7b70e81/lib/5.15.0/i686-linux-thread-multi
/home/guest/perl/perl-7b70e81/lib/5.15.0
.

---
Environment for perl 5.15.0:
HOME=/home/guest
LANG=en_US.UTF-8
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/usr/local/bin:/usr/bin:/bin:/usr/games
PERL_BADLANG (unset)
SHELL=/bin/bash

Search Discussions

  • Rafael Garcia-Suarez at Jul 11, 2011 at 2:32 pm

    On 11 July 2011 11:41, stsc@refcnt.org wrote:
    [guest@testing ~]$ ./perl-7b70e81 -e 'AUTOLOAD { bless {} }; __PACKAGE__->method'
    Segmentation fault
    That segfaults during global destruction. Adding an empty
    DESTROY method fixes the one-liner.

    A simpler way to trigger that bug, without autoloading :

    ~§ perl -e 'sub DESTROY { bless {} }; bless {}'
    Segmentation fault
  • Salvador Ortiz Garcia at Jul 13, 2011 at 4:18 am

    On 07/11/2011 09:32 AM, Rafael Garcia-Suarez wrote:
    On 11 July 2011 11:41, stsc@refcnt.orgwrote:
    [guest@testing ~]$ ./perl-7b70e81 -e 'AUTOLOAD { bless {} }; __PACKAGE__->method'
    Segmentation fault
    That segfaults during global destruction. Adding an empty
    DESTROY method fixes the one-liner.

    A simpler way to trigger that bug, without autoloading :

    ~§ perl -e 'sub DESTROY { bless {} }; bless {}'
    Segmentation fault
    Some guards against reentrance are required for "magic" functions.

    Not the same path, but on the same theme, a little more explicit:

    $ perl -e 'sub TIEHASH { tie %tmp, "main" } tie %foo, "main"'
    Segmentation fault

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupperl5-porters @
categoriesperl
postedJul 11, '11 at 9:41a
activeJul 13, '11 at 4:18a
posts3
users3
websiteperl.org

People

Translate

site design / logo © 2022 Grokbase