Skip Menu |
Report information
Id: 980
Status: resolved
Priority: 0/
Queue: perl5

Owner: Nobody
Requestors: jdporter [at] sprint.net
Cc:
AdminCc:

Operating System: Solaris
PatchStatus: (no value)
Severity: low
Type: utilities
Perl Version: (no value)
Fixed In: (no value)



Date: Fri, 9 Jul 1999 13:26:11 -0400 (EDT)
From: John Porter <jdporter [...] sprint.net>
To: perlbug [...] perl.com
Subject: Bug in perldiag
Download (untitled) / with headers
text/plain 3.4k
----------------------------------------------------------------- [Please enter your report here] perldiag appears to have a tiny -- but important error. Currently, it says: Bad free() ignored (S) An internal routine called free() on something that had never been malloc()ed in the first place. Mandatory, but can be disabled by setting environment variable PERL_BADFREE to 1. But, AFAICT, that should be 0 (zero), not 1. I base this on the code in malloc.c: if (bad_free_warn == -1) { char *pbf = PerlEnv_getenv("PERL_BADFREE"); bad_free_warn = (pbf) ? atoi(pbf) : 1; } if (!bad_free_warn) return; And indeed, setting PERL_BADFREE to 0 *DOES* silence the warning, while setting it to 1 does *NOT*. The documentation goes on to say: This message can be quite often seen with DB_File on systems with "hard" dynamic linking, like AIX and OS/2. It is a bug of Berkeley DB which is left unnoticed if DB uses forgiving system malloc(). But I experienced it (on Solaris 2.6) when attempting to set an environment variable in %ENV. [Please do not change anything below this line] ----------------------------------------------------------------- --- Site configuration information for perl 5.00502: Configured by pgduda at Thu Oct 22 18:12:42 EDT 1998. Summary of my perl5 (5.0 patchlevel 5 subversion 2) configuration: Platform: osname=solaris, osvers=2.6, archname=sun4-solaris-thread uname='sunos prod5 5.6 generic_105181-08 sun4u sparc sunw,ultra-enterprise ' hint=recommended, useposix=true, d_sigaction=define usethreads=define useperlio=undef d_sfio=undef Compiler: cc='gcc -B/usr/ccs/bin/', optimize='-O', gccversion=2.8.1 cppflags='-D_REENTRANT -I/usr/local/include' ccflags ='-D_REENTRANT -I/usr/local/include' stdchar='unsigned char', d_stdstdio=define, usevfork=false intsize=4, longsize=4, ptrsize=4, doublesize=8 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 alignbytes=8, usemymalloc=y, prototype=define Linker and Libraries: ld='gcc -B/usr/ccs/bin/', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib libs=-lsocket -lnsl -lgdbm -ldb -ldl -lm -lposix4 -lpthread -lc -lcrypt libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' ' cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib' Locally applied patches: --- @INC for perl 5.00502: /export/home/jdporter/perl /usr/local/lib/perl5/5.00502/sun4-solaris-thread /usr/local/lib/perl5/5.00502 /usr/local/lib/perl5/site_perl/5.005/sun4-solaris-thread /usr/local/lib/perl5/site_perl/5.005 . --- Environment for perl 5.00502: HOME=/export/home/jdporter LANG=en_US LC_COLLATE=en_US LC_CTYPE=en_US LC_MESSAGES=C LC_MONETARY=en_US LC_NUMERIC=en_US LC_TIME=en_US LD_LIBRARY_PATH=/usr/local/lib:/usr/local/oracle/product/8.0.5/lib:/usr/openwin/lib:/usr/dt/lib:/usr/local/pgplot:/usr/local/rvplayer5.0 LOGDIR (unset) PATH=/usr/local/bin:/usr/bin:/etc:/usr/sbin:/export/home/jdporter/bin:/usr/dt/bin:/usr/openwin/bin:/usr/local/apache/bin:.:/usr/ccs/bin:/usr/ucb:/usr/local/oracle/product/8.0.5/bin PERL5LIB=/export/home/jdporter/perl PERL_BADLANG (unset) SHELL=/bin/sh
Date: Thu, 27 Jul 2000 09:49:35 -0400 (EDT)
From: rspier [...] pobox.com (Robert Spier)
To: perl5-porters [...] perl.org
Subject: [ID 19990709.002] [DOCUMENTATION PATCH] perldiag
Download (untitled) / with headers
text/plain 795b
fixing old bugs.... http://bugs.perl.org/admin/perlbug.cgi?req=tid&tid=19990709.002 for rationale. -R [against perl-current] --- perldiag.pod.1 Thu Jul 27 09:43:43 2000 +++ perldiag.pod Thu Jul 27 09:47:46 2000 @@ -261,9 +261,9 @@ (S malloc) An internal routine called free() on something that had never been malloc()ed in the first place. Mandatory, but can be disabled by -setting environment variable C<PERL_BADFREE> to 1. +setting environment variable C<PERL_BADFREE> to 0. -This message can be quite often seen with DB_File on systems with "hard" +This message can be seen quite often with DB_File on systems with "hard" dynamic linking, like C<AIX> and C<OS/2>. It is a bug of C<Berkeley DB> which is left unnoticed if C<DB> uses I<forgiving> system malloc().
Date: Thu, 27 Jul 2000 17:20:06 +0300
From: Jarkko Hietaniemi <jhi [...] iki.fi>
To: Robert Spier <rspier [...] pobox.com>
Cc: perl5-porters [...] perl.org
Subject: Re: [ID 19990709.002] [DOCUMENTATION PATCH] perldiag
Download (untitled) / with headers
text/plain 358b
On Thu, Jul 27, 2000 at 09:49:35AM -0400, Robert Spier wrote: Show quoted text
> > fixing old bugs.... > > http://bugs.perl.org/admin/perlbug.cgi?req=tid&tid=19990709.002 > > for rationale. > > -R > > [against perl-current] > --- perldiag.pod.1 Thu Jul 27 09:43:43 2000 > +++ perldiag.pod Thu Jul 27 09:47:46 2000 > @@ -261,9 +261,9 @@
Thanks, applied.
marked [on hold] pending patch approval
closed: patch accepted


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org