develooper Front page | perl.perl5.porters | Postings from January 2001

[ID 20010116.021] $SIG{__DIE__} action-at-distance bug in

January 16, 2001 18:03
[ID 20010116.021] $SIG{__DIE__} action-at-distance bug in
Message ID:
This is a bug report for perl from,
generated with the help of perlbug 1.28 running under perl v5.6.0.

[Please enter your report here]

The module is susceptible to the old $SIG{__DIE__}
action-at-distance bug; at line 58 it does:
        unless (exists ${"$base\::"}{VERSION}) {
            eval "require $base";
            # Only ignore "Can't locate" errors from our eval require.
            # Other fatal errors (syntax etc) must be reported.
            die if $@ && $@ !~ /^Can't locate .*? at \(eval /;
The problem comes if a $SIG{__DIE__} handler is installed -- the non-error
that occurs when $base is not a package in its own file gets handed to
the handler, and if the error message is modified, or anything else goes
wrong, the whole program can be taken down.  This can happen when someone
is using CGI::Carp, for example, or any other sort of die handler.

Oddly, the same code appears in the from perl 5.005, but only since
I installed 5.6 yesterday has this bug been causing all my CGI scripts to

Recommended solution:
Modify so that the line
            eval "require $base";
            eval "local $SIG{__DIE__}; require $base";

Thank you for you time.

[Please do not change anything below this line]
Site configuration information for perl v5.6.0:

Configured by bod at Fri Dec 29 18:36:20 EST 2000.

Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
    osname=linux, osvers=2.2.18, archname=i386-linux
    uname='linux duende 2.2.18 #1 thu dec 28 14:51:40 est 2000 i686 unknown '
    config_args='-de -D prefix=/usr -D archname=i386-linux -D startperl=#!/usr/bin/perl-5.6 -D privlib=/usr/lib/perl5/5.6 -D archlib=/usr/lib/perl5/5.6/i386-linux -D sitelib=/usr/local/lib/site_perl -D man1dir=/usr/share/man/man1 -D man1ext=1p -D man3dir=/usr/share/man/man3 -D man3ext=3pm -D ccflags=-D_REENTRANT -DDEBIAN -DAPPLLIB_EXP="/usr/lib/perl5" -D optimize=-O2  -D cccdlflags=-fPIC -D d_dosuid=define -U usesfio -D d_csh=undef -D d_statblks=define -D i_db -D i_ndbm -U installusrbinperl -D pager=/usr/bin/pager -D -D useshrplib -D -D vendorprefix=/usr -D vendorlib=/usr/lib/perl5/5.005 -D vendorarch=/usr/lib/perl5/5.005/i386-linux'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define 
    use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
    cc='cc', optimize='-O2 ', gccversion=2.95.2 20000220 (Debian GNU/Linux)
    cppflags='-D_REENTRANT -DDEBIAN -DAPPLLIB_EXP="/usr/lib/perl5" -fno-strict-aliasing -I/usr/local/include'
    ccflags ='-D_REENTRANT -DDEBIAN -DAPPLLIB_EXP="/usr/lib/perl5" -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
    stdchar='char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    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, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -ldl -lm -lc -lcrypt
    libc=/lib/, so=so, useshrplib=true,
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:

@INC for perl v5.6.0:

Environment for perl v5.6.0:
    LANG (unset)
    LANGUAGE (unset)
    LOGDIR (unset)
    PERL_BADLANG (unset)
    SHELL=/bin/bash Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About