[comp.lang.perl] Perl 4.0 Bad free

pej@richsun.cpg.trs.reuters.com (Paul Jatkowski) (03/21/91)

I have just compiled Perl 4.0 on a Sun Sparstation 1+ (sunos 4.1).
t/lib/big.t prints "Bad free() ignored at ../lib/bigint.pl line 65 (and
the test passes).

Anybody got any ideas/fixes before I roll up my sleeves and try to
figure this one out?

lm@slovax.Eng.Sun.COM (Larry McVoy) (03/22/91)

In article <1581@richsun.cpg.trs.reuter.com>, pej@richsun.cpg.trs.reuters.com (Paul Jatkowski) writes:
|> I have just compiled Perl 4.0 on a Sun Sparstation 1+ (sunos 4.1).
|> t/lib/big.t prints "Bad free() ignored at ../lib/bigint.pl line 65 (and
|> the test passes).
|> 
|> Anybody got any ideas/fixes before I roll up my sleeves and try to
|> figure this one out?

I've seen this bug (last night, in fact) in:

This is perl, version 3.0

$Header: perly.c,v 3.0.1.9 90/11/10 01:53:26 lwall Locked $
Patch level: 41

---
Larry McVoy, Sun Microsystems     (415) 336-7627       ...!sun!lm or lm@sun.com

meggers@mothra.nts.uci.edu (Mark Eggers) (03/22/91)

I had this problem with Perl 4.0 on a Sparc running 4.03c.  I used the
malloc that came with SunOS and the problems went away.

/mde/

scp@acl.lanl.gov (Stephen C. Pope) (03/22/91)

In article <1581@richsun.cpg.trs.reuter.com>,
Paul (pej@richsun.cpg.trs.reuters.com (Paul Jatkowski)) said:

Paul> I have just compiled Perl 4.0 on a Sun Sparstation 1+ (sunos 4.1).
Paul> t/lib/big.t prints "Bad free() ignored at ../lib/bigint.pl line 65 (and
Paul> the test passes).

Just compiled perl 4.0 fresh off jpl-devvax on a 4.1 sparcstation 1 and
got the very same error.  The configuration is completely defaulted.

stephen pope
advanced computing lab, lanl
scp@acl.lanl.gov

ken@sdd.hp.com (Ken Stone) (03/22/91)

In article <1581@richsun.cpg.trs.reuter.com> pej@richsun.cpg.trs.reuters.com (Paul Jatkowski) writes:
>I have just compiled Perl 4.0 on a Sun Sparstation 1+ (sunos 4.1).
>t/lib/big.t prints "Bad free() ignored at ../lib/bigint.pl line 65 (and
>the test passes).

Same here with HP-UX 7.0 on an 855 ...

Also noticed that Configure -d ignores which "extra libs" I told it to use
before and just uses everything it finds ... sigh.

  -- Ken

pej@richsun.cpg.trs.reuters.com (Paul Jatkowski) (03/22/91)

In article <27E92953.12651@orion.oac.uci.edu>,
meggers@mothra.nts.uci.edu (Mark Eggers) writes:
|> 
|> I had this problem with Perl 4.0 on a Sparc running 4.03c.  I used the
|> malloc that came with SunOS and the problems went away.
|> 
|> /mde/


Yea it does, but if you link with the debugging malloc libraries sun
supplies and
call malloc_debug(2) out of main the sun malloc complains all over the
place that it's
heap is corrupted. The problem is still there, the standard malloc
routines just don't
notice.

I also have some perl scripts that use type globbing that cause core
dumps under both
Perl 3.0 patch level 44 and 4.0 that appear to be related to this problem.

Paul Jatkowski
uunet!richsun!pej

gottlieb@allan.nyu.edu (Allan Gottlieb) (03/23/91)

We also get the bad free() on a decstation 5000/200 (PXG 8 planes).

Perhaps more interesting 3 of the tests fail when compiled with -O
	op/eval test 9
	op/s    test 40
	lib/big test 0
(..bad free()... and
../lib/bigint.pl did not return a true value at .lib/big.t line 2)

Without -O we get only the bad free()
and the msg all tests successful.

Any ideas if the three failed tests represent a compiler bug or a
coding problem?