Re: XForms: Nasty pointer bug.

Steve Lamont (spl@szechuan.ucsd.edu)
Mon, 1 Jun 98 10:26:47 PDT

# To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :

> That's what I'm trying to do. It's difficult with no tools.

You might try getting dbmalloc, a rather nice memory allocation debugging
tool that was posted to USENET back when it carried something other than
spam and porn (or was that porn and beans?). An AltaVista or other search
should turn up a couple of sources.

Make sure you're not using a pointer after you've free()d it. Another
thing to check is freeing pointers more than once -- this will corrupt
the memory arena. Finally, my "favorite trick" -- to free() an automatic
variable -- makes wonderful hash out of your stack and causes very bizarre
results. I had one of those buried in about 60,000 lines of code that
took me several days to ferret out.

The difficulty in chasing a lot of these pointer problems is that the
error often manifests itself in a place seemingly unrelated to the cause.

spl
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/