[ A seemingly identical issue for 21.5.1 was discussed around May 11
("Core dump on exit in 21.5.1") but I can't tell if anything was ever
done about it. ]
I'm seeing crashes in 21.4.4 when XEmacs exits, and I'm trying to
track them down. Motif (1.2) is enabled, which is consistent with the
previous 21.5.1 reports.
Running purify, two problem areas become apparent:
* lwlib/lwlib-Xm.c:xm_update_label() seems to be called on widgets that
aren't labels. I didn't track it down any further (although I should
have), but the query for XmNlabelType fails (at the beginning of
xm_update_label()). The result is that the variable, "type", is never
set/initialized, and so xm_update_label() almost always tries updating
a widget which isn't a label (or a subclass?). I've attached a
somewhat kludgy fix for this (not submitted to -patches, because I
don't know if it's the right thing to do).
However, this uninitialized variable doesn't appear to be causing any
problems. It should still be fixed, though.
* At exit, there's a read of a free()'d block of memory ("FMR" or "Free
memory read" in purify terminology), which could cause a crash under
some circumstances. This is occurring inside Motif code, but the last
XEmacs function in the stack trace is "x_delete_device()", which is
consistent with the other "core dump at exit" crashes. This could be
a Motif bug, although it could also be caused by incorrectly using the
progress widget (who's responsible for the lwlib progress widget?). I
might have a Motif 1.2 source tree laying around somewhere, and so I
may be able to determine the cause.
I also may not be able to get around to this for some days, and so I'm
attaching a partial purify log on this, which shows where the free
memory read is occurring, where the block was freed, and where it was
allocated. [ One thing to note about purify stacktraces: the
stacktraces are inverted, and the most recently called functions are
at the top, and not the bottom. ]
--
Darryl Okahata
darrylo(a)soco.agilent.com
DISCLAIMER: this message is the author's personal opinion and does not
constitute the support, opinion, or policy of Agilent Technologies, or
of the little green men that have been following him all day.