Re: [cc65] memory corruption?

Date view Thread view Subject view

From: Marko Mäkelä (marko.makela_at_hut.fi)
Date: 2003-06-03 10:47:52


On Tue, Jun 03, 2003 at 10:20:41AM +0200, MagerValp wrote:
> Yeah, I'm thinking that I should write a test program on the PC. Where
> can I find a malloc debugger and how does it work?

Electric Fence: LD_PRELOAD=libefence.so.0 your_program, or
gdb your_program; set env LD_PRELOAD=libefence.so.0; run.  It tries to
cause a segmentation fault immediately when there is a problem, e.g.,
freeing unallocated memory, accessing freed memory, etc.

Debug malloc (Dmalloc) works by instrumenting the code at compilation
time.  I haven't used it much.

Valgrind instruments compiled code by making a binary x86-to-x86
translation.  It should be very efficient, provided that you have a x86
system (GNU/Linux; I don't know if it runs on any other system yet).

Then there are some non-free memory debuggers, like Purify and Insure++.

	Marko
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2003-06-03 10:48:10 CEST