[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Make/MiNTLib problem



Hello,

I know, I answer at old message but I think that it's important to clarify
the situation.


> Sometimes when I conmpile programs using 'make' I have following error:
> 
> make: ../mintlib/malloc.c:182: free: Assertion `s == r' failed.
> Abort
> 
> It occurs randomly, but I had it few times already. When I run make
> another time, there is no error.
> 
> I've checked mintlib/malloc.c and there is no assert line on 182, but
> there is such line (with s == r) few lines below, so it was updated.
> 
> I suggest updating make with recent mintlib.


I have exactly the same problem.

It occurs randomly, maybe 1 time each 50 uses, but the bug exists with the
current gcc/make when I compile a code with many malloc/free calls.

I didn't put any matters about it because it doesn't occur very often but
now, it's more important for me.

I explain:

I code a software ( which makes 'A LOT' of malloc/free calls) with the help
of the current mintlib and when I use it, I have sometime suddenly a exit
message like "Assertion `s == r' failed"

It occurs "close to never" on MiNT 1.16 but very often on MagiC.. But I want
to make an application compatible with the 2 main Atari's OS.

I tried to recompile this code with the current mintlib CVS without
'assert(s == r);' line in the _free() function and... It works like a charm
on MiNT and MagiC and I don't see any error or other memory leak!

Of course, it's a temporary solution because if the 'assert' macro test
gives a warning it's because the code is wrong somewhere.

For information, I get this error after many 'free()' call in the
application side ( maybe 40 or 50).


So, a idea?


PS: When Adam Klobukowski has posted this message, Frank Naumann asks him if
he hasn't problems with his memory.. For my part, I'm sure, I don't have any
memory problems because it's append both on my CT60 + MiNT, MagiCMac and
Aranym + MiNT.


Regards.