Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DESTROY optimization? #189

p5pRT opened this issue Jul 14, 1999 · 1 comment

DESTROY optimization? #189

p5pRT opened this issue Jul 14, 1999 · 1 comment


Copy link

p5pRT commented Jul 14, 1999

Migrated from (status was 'resolved')

Searchable as RT995$

Copy link

p5pRT commented Jul 14, 1999


I noticed that the sequence

  my $foo;
  $foo = new bar();

  Some_Statement (doesn't_use_foo);
  [ more Statements which don't use foo ]
sometimes seems to be optimized such that when bar​::DESTROY is called,
caller(1) returns the line number of the first Statement, not the line
number of the end of the block.

I noticed this in a largish multithreaded program.
A small test program of course failed to exhibit the bug. :-(

Log from my program​:​:193 Block​:195 UnBlock

Lines 192-195​:
my $oblock;
$oblock = new Blocker($self);

my $arg = shift;
[... 400 more lines until the end of that block]

Perl Info

Site configuration information for perl 5.00557:

Configured by smurf at Fri Jul  2 07:57:44 MEST 1999.

Summary of my perl5 (revision 5.0 version 5 subversion 57) configuration:
    osname=linux, osvers=2.2.11-noris-pre1, archname=i686-linux-thread
    uname='linux play 2.2.11-noris-pre1 #23 smp wed jun 30 05:17:45 mest 1999 i686 unknown '
    config_args='-Dusethreads -Uusenm -Duseshrplib=true -Dprefix=/usr/lib/eperl -d -e'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define useperlio=undef d_sfio=undef
    use64bits=undef usemultiplicity=undef
    cc='cc', optimize='-O2 -g', gccversion=gcc-2.96 19990603 (experimental)
    cppflags='-D_REENTRANT -Dbool=char -DHAS_BOOL -DDEBUGGING -I/usr/local/include'
    ccflags ='-D_REENTRANT -Dbool=char -DHAS_BOOL -DDEBUGGING -I/usr/local/include'
    stdchar='char', d_stdstdio=undef, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    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 -lndbm -lgdbm -ldb -ldl -lm -lrt -lpthread -lc -lposix -lcrypt
    libc=/lib/, so=so, useshrplib=true,
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/eperl/lib/5.00557/i686-linux-thread/CORE'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:

@INC for perl 5.00557:

Environment for perl 5.00557:
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PERL_BADLANG (unset)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

1 participant