Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the B-C CPAN distribution.

Report information
The Basics
Id:
80052
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
adrian [...] noisy.reservoirteam.com
Cc:
jkeenan [...] cpan.org
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
(no value)



CC: jkeenan@cpan.org
Subject: [RT 7006]: perl -MO=Bytecode doesn't work with IO::Select
B-C maintainers: On the recommendation of Father C., I am moving this old rt.perl.org ticket to rt.cpan.org. There are four sub-issues, each of which appears to deal with the interaction of Bytecode and IO::Select. Please see attachment. --Jim Keenan
Subject: rt7006.txt
1st Bug: Byteloaded code can't find methods of IO::Select noisy> ls -la total 28 drwxr-xr-x 2 adrian dev 4096 May 17 13:08 . drwxr-xr-x 9 adrian dev 4096 May 17 12:07 .. -rwxr-xr-x 1 adrian dev 61 May 17 13:06 eval-a.pl -rwxr-xr-x 1 adrian dev 70 May 17 12:54 eval-c.pl -rwxr-xr-x 1 adrian dev 61 May 17 12:59 eval-use.pl -rwxr-xr-x 1 adrian dev 62 May 17 12:53 use.pl noisy> cat use.pl #!/usr/bin/perl use IO::Select; my $x = IO::Select -> new(); noisy> ./use.pl noisy> perl -MO=Bytecode use.pl | byteload > use use.pl syntax OK noisy> chmod 755 use noisy> ./use Can't locate object method "new" via package "IO::Select" at use.pl line 4. noisy> 2nd Bug: Attempt to dynamically use IO::Select at from byteloaded code causes "Out of memory!" error after numerous warnings. noisy> cat eval-c.pl #!/usr/bin/perl eval "use IO::Select"; my $x = IO::Select -> new(); noisy> ./eval-c.pl noisy> perl -MO=Bytecode eval-c.pl | byteload > eval-c eval-c.pl syntax OK noisy> chmod 755 eval-c noisy> ./eval-c Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Out of memory! Callback called exit at ./eval-c line 2. END failed--call queue aborted at ./eval-c line 10. Callback called exit at ./eval-c line 10. END failed--call queue aborted at ./eval-c line 2. Attempt to free unreferenced scalar at ./eval-c line 2. noisy> 3rd Bug: Occasionally, rather than demonstrating 2nd Bug above, a core dump occurs running byteloaded code - apparently depending on filename and file contents (!!!) noisy> cat eval-use.pl #!/usr/bin/perl eval "use IO::Select"; IO::Select -> new(); noisy> ./eval-use.pl noisy> !perl:p perl -MO=Bytecode eval-c.pl | byteload > eval-c noisy> perl -MO=Bytecode eval-use.pl | byteload > eval-use eval-use.pl syntax OK noisy> chmod 755 eval-use noisy> ./eval-use Segmentation fault (core dumped) noisy> cp eval-use.pl eval-a.c noisy> diff eval-use.pl eval-a.c noisy> ./eval-a.pl noisy> perl -MO=Bytecode eval-a.pl | byteload > eval-a eval-a.pl syntax OK noisy> chmod 755 eval-a noisy> ./eval-a Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free non-existent shared string at /usr/lib/perl5/5.6.0/warnings.pm line 69. Attempt to free unreferenced scalar at /usr/lib/perl5/5.6.0/warnings/register.pm line 3. Attempt to free unreferenced scalar at /usr/lib/perl5/5.6.0/warnings/register.pm line 3. Attempt to free unreferenced scalar at /usr/lib/perl5/5.6.0/warnings/register.pm line 3. Attempt to free unreferenced scalar at /usr/lib/perl5/5.6.0/warnings/register.pm line 3. Attempt to free unreferenced scalar at /usr/lib/perl5/5.6.0/warnings/register.pm line 3. Attempt to free unreferenced scalar at /usr/lib/perl5/5.6.0/warnings/register.pm line 3. Out of memory! Callback called exit at ./eval-a line 2. END failed--call queue aborted at ./eval-a line 10. Callback called exit at ./eval-a line 10. END failed--call queue aborted at ./eval-a line 2. Attempt to free unreferenced scalar at ./eval-a line 2. noisy> (copying eval-c.pl from 2nd Bug above to the filename eval-use.pl does not appear to change it's behaviour - it still gives an "Out of memory!" error after numerous "Attempt to free non-existent shared string" messages.) The 'byteload' script is one of my own devising which simply adds an appropriate header to the front of the bytecode: noisy> cat `which byteload` : echo '#!/usr/bin/perl' echo 'use ByteLoader 0.03;' cat noisy> The scripts I've included aren't useful on their own, obviously, but do demonstate the problems fairly succinctly. Any workarounds/suggestions would be eagerly received. Basically I want to distribute bytecode versions of my code, but compile the system modules at runtime. I've had trouble bytecoding compiling many of the system modules, anyway. My boss won't let me distribute readable code (even obfuscated) :-( :-( [Please do not change anything below this line] ----------------------------------------------------------------- --- Flags: category=core severity=medium --- Site configuration information for perl v5.6.0: Configured by prospector at Mon Aug 7 10:58:30 EDT 2000. Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration: Platform: osname=linux, osvers=2.2.5-22smp, archname=i386-linux uname='linux porky.devel.redhat.com 2.2.5-22smp #1 smp wed jun 2 09:11:51 edt 1999 i686 unknown ' config_args='-des -Doptimize=-O2 -march=i386 -mcpu=i686 -Dcc=gcc -Dcccdlflags=-fPIC -Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux -Dd_dosuid -Dd_semctl_semun -Di_db -Di_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Uuselargefiles' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=undef d_sfio=undef uselargefiles=undef use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef Compiler: cc='gcc', optimize='-O2 -march=i386 -mcpu=i686', gccversion=2.96 20000731 (experimental) cppflags='-fno-strict-aliasing' ccflags ='-fno-strict-aliasing' 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=4 alignbytes=4, usemymalloc=n, prototype=define Linker and Libraries: ld='gcc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -ldl -lm -lc -lcrypt libc=/lib/libc-2.1.92.so, so=so, useshrplib=false, libperl=libperl.a 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: /usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0 /usr/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl . --- Environment for perl v5.6.0: HOME=/home/adrian LANG=en_US LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin:/data/dev/bin PERL_BADLANG (unset) SHELL=/bin/tcsh
This was fixed a few years ago. $ perlcc -B -r -e'use IO::Select; my $x = IO::Select -> new(); print q(ok)' ok -- Reini Urban


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.