Ethereal-dev: Re: [Ethereal-dev] seg fault - gtkclist ?

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: David Frascone <dave@xxxxxxxxxxxx>
Date: Wed, 25 Jul 2001 14:53:09 -0500
On Wed, Jul 25, 2001 at 02:48:52PM -0500, Frank Singleton wrote:
> David Frascone wrote:
> > 
> > Or, just link with e-fence :)
> 
> Good, idea .. any pointers on what needs editing in
> ethereals Makefiles to link against /usr/lib/libefence.so ?
> 

It's pretty easy, really.  Just find the libraries line, and add -lefence 
before all the other -l's

That's all you have to do.

Oh, and it will force a dump, so run ethereal in gdb, and it will dump 
whenever a malloced overwrite occurs.

Personally, I've written several malloc checkers, but I've never seen one
as gracefully simple as electric fence.  It just uses the MMU to mark
the data before and after the malloced chunk as inaccessible.  That way,
any over or under writes cause your program to dump.

Good luck,


Dave