Front page | perl.perl5.porters |
Postings from March 2000
[ID 20000314.004] embedded perl causes problems when dynamicallyloaded
Thread Next
From:
Adrian Harris
Date:
March 14, 2000 09:28
Subject:
[ID 20000314.004] embedded perl causes problems when dynamicallyloaded
Message ID:
200003141727.JAA16311@adrianh.hq.tensilica.com
This is a bug report for perl from adrianh@tensilica.com,
generated with the help of perlbug 1.26 running under perl 5.00502.
-----------------------------------------------------------------
[Please enter your report here]
I have had a hard time getting an embedded perl interpreter to work as a dynamically loaded module. I kept getting 'Bad free() ignored' at run time. It turns out that perl has its own memory management - fine, but it redefines malloc and free etc. That is bad when the library is dynamically loaded since the perl free routine 'shows up' after memory has already been managed by the libc routines. This might be fixable by passing different flags to the dynamic loader, but I do not have access to that routine since it is controled by a third party tool.
I consider it a bug that perl redefines malloc and free. I think they should be perl_malloc and perl_free or something like that.
As long as the names are not changed, it will be impossible to dynamically load a perl interpreter.
Thanks
Adrian
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Site configuration information for perl 5.00502:
Configured by source at Wed Jun 23 13:40:14 PDT 1999.
Summary of my perl5 (5.0 patchlevel 5 subversion 2) configuration:
Platform:
osname=linux, osvers=2.0.33, archname=i686-linux
uname='linux sonata 2.0.33 #49 wed jul 22 04:14:00 pdt 1998 i686 unknown '
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef useperlio=undef d_sfio=undef
Compiler:
cc='cc', optimize='-O2', gccversion=2.7.2.3
cppflags='-Dbool=char -DHAS_BOOL -I/usr/local/include -I/usr/xtensa/beta-source/cvsroot/StandardTools/perl5.005_02/../gdbm-1.7.3'
ccflags ='-Dbool=char -DHAS_BOOL -I/usr/local/include -I/usr/xtensa/beta-source/cvsroot/StandardTools/perl5.005_02/../gdbm-1.7.3'
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
alignbytes=4, usemymalloc=n, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib -L/usr/xtensa/beta-source/cvsroot/StandardTools/perl5.005_02/../gdbm-1.7.3'
libpth=/usr/local/lib /usr/xtensa/beta-source/cvsroot/StandardTools/perl5.005_02/../gdbm-1.7.3 /lib /usr/lib
libs=-lnsl -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt
libc=, 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 -L/usr/xtensa/beta-source/cvsroot/StandardTools/perl5.005_02/../gdbm-1.7.3'
Locally applied patches:
---
@INC for perl 5.00502:
/usr/xtensa/stools/lib/perl5/5.00502/i686-linux
/usr/xtensa/stools/lib/perl5/5.00502
/usr/xtensa/stools/lib/perl5/site_perl/5.005/i686-linux
/usr/xtensa/stools/lib/perl5/site_perl/5.005
.
---
Environment for perl 5.00502:
HOME=/home/adrianh
LANG (unset)
LD_LIBRARY_PATH=/usr/lib:/usr/local/lib:/usr/dt/lib:/usr/openwin/lib
LOGDIR (unset)
PATH=.:/home/adrianh/bin:/usr/xtensa/stools/bin:/home/adrianh/bin/xtools/bin:/bin:/opt/SUNWspro/bin:/usr/ucb/bin:/usr/ccs/bin:/usr/sbin:/usr/dt/bin:/usr/local/bin:/usr/local/libexec:/usr/local/lsf/bin:/usr/bin:/usr/openwin/bin:/cad/cds/S97BNC/tools/bin:/cad/cds/S97BNC/tools/dfII/bin:/cad/syssc2/vera-4.3-solaris2.5/bin:/cad/summit/HDLScore/bin:/cad/signalscan/solaris/signalscan-6.2/sparc-solaris/bin:/home/davel/0in_stable/stable.sun/sun4os5/bin:/cad/continuum/vtv197:/cad/modeltech/modeltech_v5.2:/cad/interHDL/checkit-1.18:/cad/interHDL/coverIt-1.10:/cad/interHDL/verilint-4.13:/cad/interHDL/intervhdl-1.57:/cad/interHDL/testit-2.06:/cad/vcs/vcs5.0.1A/sun_sparc_solaris_5.4/bin:/cad/cds/S97BNC/tools/bin:/cad/cds/S97BNC/tools/dfII/bin:/cad/cds/S97BNC/tools/pcb/bin:/opt/kde/bin:/usr/X11R6/bin
PERL_BADLANG (unset)
SHELL=/bin/bash
Thread Next
-
[ID 20000314.004] embedded perl causes problems when dynamicallyloaded
by Adrian Harris