[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: (fwd) kmtrace & SuSE 7.3
From:       Chris Schlaeger <cs () suse ! de>
Date:       2001-11-28 16:45:05
[Download RAW message or body]

On Tue, Nov 27, 2001 at 06:32:24PM +0100, Michael Matz wrote:
> Hi,
> 
> On Tue, 27 Nov 2001, Dirk Mueller wrote:
> 
> > these two do not work together. all apps lock up upon starting :-(
> 
> When inspecting the backtrace below it seems ktrace calls free() in
> the malloc() hook (indirectly through addAllocationToTree).  This is an
> exceptionally bad idea.  A lockup would not be surprising to me (a
> semaphore for all malloc structures, taken in malloc() and free()).

Why do you think so? It's the malloc hook, not malloc itself, so we
are not in the malloc code yet.
> 
> The right thing is to delay the freeing of those arrays to a later point.
> Alternatively (as it seems to be the locking in the hooks themself, not
> the malloc() or free() routines) deactivate also the freehook during
> mallochook, or release the lock during addAllocationToTree().  But that's
> the least appealing solution.  Calling free() from malloc() seems to be
> inherently fragile.
> 
> 
> Ciao,
> Michael.

Chris

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic