Subject: | assertion botched free()ed/realloc()ed-away memory was overwritten |
While running (perl -d:ptkdb trivial.pl) the following ...
#!/usr/local/bin/perl
use warnings; use strict;
my $p;
... in a file, say trivial.pl, a window flashes followed by this message ...
assertion botched (free()ed/realloc()ed-away memory was overwritten?): !
(MallocCfg[MallocCfg_filldead] && MallocCfg[MallocCfg_fillcheck]) || !
cmp_pat_4bytes((unsigned char*)(p + 1), (((1 << ((bucket) >> 0)) + ((bucket >= 15 * 1)
? 4096 : 0)) - (sizeof(union overhead) + sizeof (unsigned int))) + sizeof (unsigned
int), fill_deadbeef) (malloc.c:1533)
I have attached the gbd backtrace output on the perl core file. ptkdb was built from
FreeBSD ports; FreeBSD version is ...
FreeBSD holestein.holy.cow 6.1-RC FreeBSD 6.1-RC #3: Wed Apr 19 19:25:11 EDT 2006
root@holestein.holy.cow:/work/obj/misc/src-6/sys/BOVINE-T42.6 i386
... and perl version ...
This is perl, v5.8.8 built for i386-freebsd-64int
(with 1 registered patch, see perl -V for more detail)
Copyright 1987-2006, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
... detailed version ...
Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
Platform:
osname=freebsd, osvers=6.1-prerelease, archname=i386-freebsd-64int
uname='freebsd holestein.holy.cow 6.1-prerelease freebsd 6.1-prerelease #2: thu apr
6 21:56:05 edt 2006 root@holestein.holy.cow:workobjmiscsrc-6sysbovine-t42.6 i386 '
config_args='-sde -Dprefix=/misc/local -Darchlib=/misc/local/lib/perl5/5.8.8/mach -
Dprivlib=/misc/local/lib/perl5/5.8.8 -Dman3dir=/misc/local/lib/perl5/5.8.8/perl/man/
man3 -Dman1dir=/misc/local/man/man1 -Dsitearch=/misc/local/lib/perl5/site_perl/5.8.8/
mach -Dsitelib=/misc/local/lib/perl5/site_perl/5.8.8 -Dscriptdir=/misc/local/bin -
Dsiteman3dir=/misc/local/lib/perl5/5.8.8/man/man3 -Dsiteman1dir=/misc/local/man/man1 -
Ui_malloc -Ui_iconv -Uinstallusrbinperl -Dcc=cc -Duseshrplib -Dccflags=-DAPPLLIB_EXP="/
misc/local/lib/perl5/5.8.8/BSDPAN" -Doptimize=-g -DDEBUGGING -Ud_dosuid -Di_gdbm -
Dusethreads=n -Dusemymalloc=y -Duse64bitint'
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=define use64bitall=undef uselongdouble=undef
usemymalloc=y, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-DAPPLLIB_EXP="/misc/local/lib/perl5/5.8.8/BSDPAN" -
DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DDEBUGGING -fno-strict-aliasing -pipe -
Wdeclaration-after-statement -I/usr/local/include',
optimize='-g',
cppflags='-DAPPLLIB_EXP="/misc/local/lib/perl5/5.8.8/BSDPAN" -DHAS_FPSETMASK -
DHAS_FLOATINGPOINT_H -DDEBUGGING -fno-strict-aliasing -pipe -Wdeclaration-after-
statement -I/usr/local/include'
ccversion='', gccversion='3.4.4 [FreeBSD] 20050518', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long long', ivsize=8, 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=-lgdbm -lm -lcrypt -lutil
perllibs=-lm -lcrypt -lutil
libc=, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -Wl,-R/misc/local/lib/
perl5/5.8.8/mach/CORE'
cccdlflags='-DPIC -fPIC', lddlflags='-shared -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: DEBUGGING MYMALLOC PERL_MALLOC_WRAP USE_64_BIT_INT
USE_LARGE_FILES USE_PERLIO
Locally applied patches:
defined-or
Built under freebsd
Compiled at Apr 18 2006 23:38:49
@INC:
/misc/local/lib/perl5/5.8.8/BSDPAN
/misc/local/lib/perl5/site_perl/5.8.8/mach
/misc/local/lib/perl5/site_perl/5.8.8
/misc/local/lib/perl5/site_perl/5.8.7
/misc/local/lib/perl5/site_perl/5.8.6
/misc/local/lib/perl5/site_perl
/misc/local/lib/perl5/5.8.8/mach
/misc/local/lib/perl5/5.8.8
.