Subject: | Bad free() ignored (PERL_CORE) |
After installing XML-LibXML-1.57 via FreeBSD ports collection, a perl warning appeared:
Bad free() ignored (PERL_CORE)
root@des-free#uname -a
FreeBSD des-free.lini-a.ru 4.9-20040227-STABLE FreeBSD 4.9-20040227-STABLE #0: Sat Feb 28 00:08:18 GMT 2004 root@vic-free.lini-a.ru:/usr/obj/usr/src/sys/GENERIC i386
root@des-free#perl -V
Summary of my perl5 (revision 5.0 version 8 subversion 2) configuration:
Platform:
osname=freebsd, osvers=4.9-stable, archname=i386-freebsd
uname='freebsd vic-free.lini-a.ru 4.9-stable freebsd 4.9-stable #11: tue feb 3 16:02:30 msk 2004 admin@vic-free.lini-a.ru:usrobjusrsrcsysvic-free i386 '
config_args='-sde -Dprefix=/usr/local -Darchlib=/usr/local/lib/perl5/5.8.2/mach -Dprivlib=/usr/local/lib/perl5/5.8.2 -Dman3dir=/usr/local/lib/perl5/5.8.2/man/man3 -Dman1dir=/usr/local/man/man1 -Dsitearch=/usr/local/lib/perl5/site_perl/5.8.2/mach -Dsitelib=/usr/local/lib/perl5/site_perl/5.8.2 -Dscriptdir=/usr/local/bin -Ui_malloc -Ui_iconv -Uinstallusrbinperl -Dcc=cc -Doptimize=-O -pipe -Duseshrplib -Dccflags=-DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.2/BSDPAN" -Ud_dosuid -Ui_gdbm -Dusethreads=n -Dusemymalloc=y'
hint=recommended, 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=y, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.2/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -I/usr/local/include',
optimize='-O -pipe ',
cppflags='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.2/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -I/usr/local/include'
ccversion='', gccversion='2.95.4 20020320 [FreeBSD]', 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 ='-Wl,-E -L/usr/local/lib'
libpth=/usr/lib /usr/local/lib
libs=-lm -lcrypt -lutil -lc
perllibs=-lm -lcrypt -lutil -lc
libc=, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -Wl,-R/usr/local/lib/perl5/5.8.2/mach/CORE'
cccdlflags='-DPIC -fPIC', lddlflags='-shared -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: USE_LARGE_FILES
Built under freebsd
Compiled at Feb 21 2004 10:58:47
@INC:
/usr/local/lib/perl5/site_perl/5.8.2/mach
/usr/local/lib/perl5/site_perl/5.8.2
/usr/local/lib/perl5/site_perl
/usr/local/lib/perl5/5.8.2/BSDPAN
/usr/local/lib/perl5/5.8.2/mach
/usr/local/lib/perl5/5.8.2
.
How to reproduce:
file pr0.xml
<?xml version="1.0" encoding="UTF-8"?>
<root0>
<a>A</a>
</root0>
file pr0.xsl
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="a">
<QQQ>QWERTY</QQQ>
</xsl:template>
</xsl:stylesheet>
file test.pl
#!/usr/local/bin/perl
use warnings;
no warnings qw(once);
use XML::LibXSLT;
use XML::LibXML;
my $libxml_obj=XML::LibXML->new();
my $res=XML::LibXML->new();
my $libxslt_obj=XML::LibXSLT->new();
my $xslt=$libxslt_obj->parse_stylesheet_file("pr0.xsl");
my $xml = $libxml_obj->parse_file("pr0.xml");
$res=$xslt->transform(
$xml
);
$xslt->output_file($res,"res");
root@des-free#./test.pl
Bad free() ignored (PERL_CORE).
root@des-free#