Redhat 5.0 / GNU Libc 2 Debugging

From: George (greerga@CIRCLEMUD.ORG)
Date: 05/19/98


From egcs mailing list:
--- 8< --- 8< ---
$ MALLOC_CHECK_=1 ./calc f1 / g2
malloc: using debugging hooks
free(): invalid pointer 804b220!
free(): invalid pointer 804b238!
free(): invalid pointer 804b208!
Segmentation fault
$ MALLOC_CHECK_=2 ./calc f1 / g2
Aborted
--- 8< --- 8< ---

MALLOC_CHECK_=1         - Debugging information.
MALLOC_CHECK_=2         - Abort on invalid malloc() data.

I would recommend _against_ putting 'export MALLOC_CHECK_=1' in your
startup profile unless you want to check 'ls', 'gdb', 'pine' and every
other application on your hard drive.  The syntax at the top sets the
variable only for that program.  This will _not_ work with Linux libc 5.x,
I tried with 5.4.44.

This may save hours of hair torture in your CircleMUD (see? it's related)
debugging.

--
George Greer, greerga@circlemud.org | Genius may have its limitations, but
http://patches.van.ml.org/          | stupidity is not thus handicapped.
http://www.van.ml.org/CircleMUD/    |                  -- Elbert Hubbard


     +------------------------------------------------------------+
     | 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