# does *NOT* die when this is not imported - importing # and using this is what triggers the COP->cop_warnings to be bad. use B::Utils qw'walkallops_simple'; use B::Generate; $\ = "\n"; $| = 1; print "$_ " . $_->VERSION for qw( B B::Utils B::Generate ); B::Utils::walkallops_simple( \ &cb ); sub cb { my $op = shift; my $addr = $$op; return unless $op=~/COP/; my $w = unpack('H*', unpack "P", pack 'L', $addr + 48); return if $w eq "00"; print $w; print unpack 'H*', unpack 'P56', pack 'L', $addr; print $op->file . ":" . $op->line; print $op->warnings; # SEGFAULT HERE } #### B 1.02 B::Utils 0.04 B::Generate 1.06 0c 28031d0848031d08b0ef0b0800000000ae008411010200000000000054d61508f42016086b010000000000001e0100000c00000000000000 /home/josh/perl5.8.3/lib/site_perl/5.8.3/B/Utils.pm:286 Segmentation fault #### Summary of my perl5 (revision 5.0 version 8 subversion 3) configuration: Platform: osname=linux, osvers=2.6.3, archname=i686-linux uname='linux lik.grenekatz.org 2.6.3 #5 sun feb 29 22:24:31 local time zone must be set--see zic manu i686 amd athlon(tm) xp 2500+ authenticamd gnulinux ' config_args='-Dmksymlinks -Dprefix=/home/josh/perl5.8.3 -de' hint=previous, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O3', cppflags='-fno-strict-aliasing -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' ccversion='', gccversion='3.3.2 20031218 (Gentoo Linux 3.3.2-r5, propolice-3.3-7)', 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 -ldb -ldl -lm -lcrypt -lutil -lc perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc libc=/lib/libc-2.3.2.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='2.3.2' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic' cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: USE_LARGE_FILES Built under linux Compiled at Mar 1 2004 14:04:37 @INC: /home/josh/perl5.8.3/lib/5.8.3/i686-linux /home/josh/perl5.8.3/lib/5.8.3 /home/josh/perl5.8.3/lib/site_perl/5.8.3/i686-linux /home/josh/perl5.8.3/lib/site_perl/5.8.3 /home/josh/perl5.8.3/lib/site_perl .