mdb help bug

Fergus Henderson fjh at
Wed Oct 21 09:59:59 AEST 1998

Hi Zoltan,

I spent some time tracking down that mdb help bug that showed up in the
nightly tests.  I'm pretty sure it is a memory management bug.
Basically the problem comes in MR_trace_help_add_node()
in mercury_trace_help.c when you call the Mercury routine
help__add_help_node which has been exported to C as
ML_HELP_add_help_node().  The problem is that you pass
strings to Mercury, and then later these strings are deallocated
using free(), even though the Mercury code has retained
a reference to them.

Fergus Henderson <fjh at>  |  "I have always known that the pursuit
WWW: <>  |  of excellence is a lethal habit"
PGP: finger fjh at        |     -- the last words of T. S. Garp.

More information about the developers mailing list