> When the MUD i program for crashes, i try to use GDB to debug and fix.
> Now, this is fine ... but i don't understand the following core
> information.
>
> A mob crashed the mud when it was being freed, and a corpse was going
> to be replaced.
>
> Now, this mob has been killed lots of times before, so i'm not so
> suspicious it was the mob, as opposed to a memory leak from some bad
> trigger.
>
> short_descr =
> 0x8a65220 "a /cRs/cwp/cRo/cwt/cRt/cwe/cRd/cw /cRF/cwl/cRe/cwn/cRi/cwg/cRa/c
> wl/cR /cwb/cRi/cwr/cRd/cx",
> long_descr = 0x8a65280 "A small /cRs/cwp/cRo/cwt/cRt/cwe/cRd
> F/cwl/cRe/cwn/cRi/cwg/cRa/cwl b/cRi/cwr/cRd/c0 flitters about.\r\n",
> (gdb) print ch->short_descr
> $2 =
> 0x8a65220 "a /cRs/cwp/cRo/cwt/cRt/cwe/cRd/cw /cRF/cwl/cRe/cwn/cRi/cwg/cRa/c
> wl/cR /cwb/cRi/cwr/cRd/cx"
> (gdb) print mob_proto[i].short_descr
> $3 = 0x90ecdc0 "a /cyf/cmr/cci/cMen/ccd/cml/cyy /cWko/cLa/cWla/c0"
First, you have a buffer overrun. I don't know where it is
specifically, but I'd recommend you check any functions which alter the
descriptions of a mob - primarily OLC.
If you played with OLC too much, you may have created it
incidentally (looks sort of like you did; you get that sort of corruption
when you free a string and then write to it without allocating the memory
first) or you may have a deeper problem - like creating a race situation
or the sort.
You're probably in luck though; it looks like only the
descriptions are messed up - the stuff before and after them seems normal
- this probably indicates that it's not an overrun outside of some
deliberate action.
Make sure that a patch didn't insert this problem, and then focus
on new code you wrote for OLC.
PjD
--
+---------------------------------------------------------------+
| FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
| Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
| Newbie List: http://groups.yahoo.com/group/circle-newbies/ |
+---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 06/25/03 PDT