Subject: Re: pointer tracking patch for fvwm/* and libs/*

From: Dan Espen <[email-masked]>
Date: Thu, 14 Dec 2000 19:05:17 -0500

"Nils Lohner" <[email-masked]> writes:
> 
>   in both libs and fvwm drastically reduces the errors in the log.  
> Something somewhere else is malloc()ing stuff though, and I don't know 
> what... any ideas?

> Can we get this rolled into the distribution, enabled by 
> --enable-mem-check perhaps?  I still think its useful, even if dmalloc 
> may duplicate a good chunk of this functionality.  This one can be 
> custom taylored to work as we need it to, and can be made aware of more 
> stuff.
...
>   if ((d = (char *)safemalloc (l,"char", "strdup")) == NULL)

If we made this a part of fvwm, the  strings "char" and "strdup" would
end up in the binary and be added to the  parameter lists whether this
option  was  enabled  or  not.    This would add    to the  size   and
theoretically slow down execution.

You would want to do this with macros so you could throw away
the extra args when the debug option wasn't enabled.

Please stay on the fvwm-workers list.

--
Dan Espen
444 Hoes Lane  Room RRC 1C-214           E-mail: [email-masked]
Piscataway, NJ 08854                     Phone: (732) 699-5570
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Nils Lohner <[email-masked]>
Date: Fri, 15 Dec 2000 10:13:31 +0100

In message <[email-masked]>, Dan Espen 
>the extra args when the debug option wasn't enabled.

I'm just doing a first cut, getting it to work.  If you suggest on how 
to put it into macros (or suggest on how to cleanly implement this), 
I'll do it... I haven't worked much with macros in the past.  I don't 
even mind cleaning out the code again when the bug is resolved, I just 
need to find the damn thing, and can't seem to get closer to it.

>Please stay on the fvwm-workers list.

Sure, sorry, I just didn't want to send 100k mails to the list...

Nils.

---

From: Dominik Vogt <[email-masked]>
Date: Sun, 17 Dec 2000 07:51:56 +0100

On Fri, Dec 15, 2000 at 10:13:31AM +0100, Nils Lohner wrote:
> I'll do it... I haven't worked much with macros in the past.

Something like this

  #ifdef USE_OUR_VERY_SPECIAL_MALLOC_DEBUG_CODE
  #define fvwmmalloc(size, type, function) safemalloc_debug(size, type, function)
  #define fvwmfree(size, type, function) free_debug(size, type, function)
  ... more functions
  #else
  #define fvwmmalloc(size, type, function) safemalloc(size)
  #define fvwmfree(size, type, function) free(size)
  ... more functions
  #endif

> I don't 

One thing that might help a lot is to play very close attention
to the circumstances of the crash.  Is there anything common to
all crashes?  Every bit may help.  

Bye

Dominik ^_^  ^_^

--
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]