Incredibly Strange Bug

From: Tony Robbins [Kupek] (tonyr@NWPACLINK.COM)
Date: 09/13/98


Ok, this bug is, well, incredibly strange.

What happens is this:

Belgarath enters MEDIT.
He doesn't make a change.
He types Q, to quit.
He is returned to the prompt.
Anything he types causes a crash right here:

void write_to_q(const char *txt, struct txt_q *queue, int aliased)
{
  struct txt_block *newt;

  CREATE(newt, struct txt_block, 1); <-----
  CREATE(newt->text, char, strlen(txt) + 1);
  strcpy(newt->text, txt);
  newt->aliased = aliased;

  /* queue empty? */
  if (!queue->head) {
    newt->next = NULL;
    queue->head = queue->tail = newt;
  } else {
    queue->tail->next = newt;
    queue->tail = newt;
    newt->next = NULL;
  }
}


The debugger output passed me down to that line, but I couldn't get any
data out of it.  It's a malloc failure, and the failure is actually in my
malloc lib.

This bug was born when I went and diff'd my circle30bpl12 MUD against
circle30bpl12, and began moving all my changes over to bpl14.  There was
about a meg of changes, so I expected bugs, but not like this.

It occurs in REDIT, MEDIT, OEDIT, and SEDIT (not Z, H, A, TRIG, or T),
when I do not save a change or do not make a change.  This leads me to
believe that I'm not freeing something I should, or I'm freeing something
I shouldn't with medit_free_mobile, free_object, free_room, etc.

If you get any ideas, let me know.  I continue to dig, in the meantime...

-B.

[-------------------------------------------]
  Tony Robbins, <tonyr@nwpaclink.com>
  LakeView Technologies, Inc.
[-------------------------------------------]


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



This archive was generated by hypermail 2b30 : 12/15/00 PST