Checking Memory...

From: Deja Augustine (PraetorXI@aol.com)
Date: 09/25/00


Well, I think I've pin-pointed the problem that I was having with sedit,
though it exists and errors out in several separate areas.  The problem is
this:

When sedit tries to save it internally, it calls various functions to
transfer the data over into the "real" memory of the MUD, rather than the
temporary one it was in.  However, it seems that the usual safeguards are
failing in determining when the temporary one can be freed.

From using GDB and a series of self-inflicted, crashing scenarios, I've
discovered that when the code does something like:
  if(*tlist)   or    if(shop->blah_string)

they will evaluate to true, even if the memory they point to doesn't "exist"
anymore, or never existed in the first place.  So, when it tries to free the
pointers, the program has a heart-attack and dies.

However, I can't figure out how else to check to see if the pointers actually
point to valid memory locations or not.

Can anyone help?


     +------------------------------------------------------------+
     | 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/11/01 PDT