Re: SAFE_FREE macro was Compiling on BSDI BSD/OS 4.0

From: The Merciless Lord of Everything (serces@mud.dk)
Date: 02/05/00


On Fri, 4 Feb 2000, Peter Ajamian wrote:

> free (imho) are the rusult of trying to free a NULL pointer
Nice with that much input.. BUT! Having looked a bit further into it,
discussed it with some other people and so on. free() should be able to
take a NULL value and simply state "pah" to it..

This works e.g.
void *blah = malloc(400);
free (blah); /* Works, blah is not Null, it's garbarge) */

Where as trying to reproduce my problem wasn't possible, someone suggested
a test of the following:

void *blah = malloc(400);
free(blah); /* First time around, should work */
free(blah); /* Now it will crash or otherwise unpredictable behaviour */

So, my best guess is that somewhere is a double free which have gotten
fixed due to something else.

(or perhaps I've just not run into it yet.. *sigh* )

/S



"The Law of Self Sacrifice"
When you starve with a tiger, the tiger starves last.


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 04/10/01 PDT