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

List:       kde-core-devel
Subject:    Re: (fwd) kmtrace & SuSE 7.3
From:       Michael Matz <matz () kde ! org>
Date:       2001-11-27 17:32:24
[Download RAW message or body]

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()).

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.

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

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