*BSD News Article 89703


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!news.wildstar.net!news.ececs.uc.edu!newsfeeds.sol.net!news.maxwell.syr.edu!feed1.news.erols.com!news.magicnet.net!news.thrush.com!not-for-mail
From: rd@tarpit.thrush.com (R.D. Thrush)
Newsgroups: comp.unix.bsd.bsdi.misc
Subject: Re: Perl 5.003 and BSD 2.1 (libwww-perl-5.0x)
Date: 18 Feb 1997 15:36:14 -0500
Organization: Genesis Controls, Inc.
Lines: 50
Message-ID: <fjd8tx26o1.fsf@tarpit.thrush.com>
References: <32ee65fc.336138651@news.charm.net>
	<5d3k1b$rqh$1@lscruz.scf.lmms.lmco.com>
NNTP-Posting-Host: thrush.com
To: Gary Liefer <gary@lscruz.scf.lmms.lmco.com>
Cc: bsdi-users@bsdi.com
X-Newsreader: Gnus v5.2.25/XEmacs 19.14
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.bsdi.misc:6044

  [ Mailed and posted. ]

>>>>> "Gary" == Gary Liefer <gary@lscruz.scf.lmms.lmco.com> writes:
Gary> In article <32ee65fc.336138651@news.charm.net>,
Gary> Sean Rolinson <snowdog@charm.net> wrote:
>> I've recently compiled perl5.003 and libwww-perl-5.06.  Both installed
>> okay and testing fine, but when running GET, here is what message I
Gary> [ ... ]
>> Bad free() ignored at /usr/local/lib/perl5/DynaLoader.pm line 140.
>> Bad free() ignored at /usr/local/lib/perl5/DynaLoader.pm line 140.

Gary> - I tracked this problem to the the BSDI dynamic load library
Gary> (libdl.a).  The problem crops up when the executable is invoked
Gary> without an absolute path.  Function dlopen needs to read the
Gary> symbol table but it has to search for the a.out file.  The "Bad
Gary> free()" error seems to occur when a different version of perl
Gary> (with the same name) is found somewhere in the path before the
Gary> one that's actually running.

  This is related to using the perl5-supplied malloc.  The "Bad free()
ignored ..." messages disappear when perl5.003_27 is made with the
attached patch.  I haven't investigated further but would be
interested to learn if this patch causes other problems.

--- perl5.003_27/hints/bsdos.sh-	Tue Feb  4 22:20:05 1997
+++ perl5.003_27/hints/bsdos.sh	Tue Feb 18 13:59:18 1997
@@ -5,6 +5,8 @@
 #     Tue Oct  4 12:01:34 EDT 1994
 # Updated by Tony Sanders <sanders@bsdi.com>
 #     Mon Nov 27 17:25:51 CST 1995
+# Updated by Bob Thrush <rd@thrush.com>
+#     Tue Feb 18 13:58:20 EST 1997
 #
 # You can override the compiler and loader on the Configure command line:
 #     ./Configure -Dcc=shlicc2 -Dld=shlicc2
@@ -105,5 +107,11 @@
 	libswanted="Xpm Xaw Xmu Xt SM ICE Xext X11 $libswanted"
 	libswanted="rpc curses termcap $libswanted"
 
+	# Using the system malloc fixes a "Bad free() ignored ..." problem
+	# when invoking perl -d without an absolute path.
+	# This is probably also required for 2.0 but without 2.0 access I 
+	# can't test it.
+	d_mymalloc='undef'
+	usemymalloc='n'
 	;;
 esac

-- 
Bob Thrush rd@thrush.com    407 425-4845/ FAX 872-8442 or 841-8004