This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Bug malloc/16573] mtrace hangs when MALLOC_TRACE is defined


On Thu, Feb 13, 2014 at 11:44:49AM +0000, kcy at codesourcery dot com wrote:
> https://sourceware.org/bugzilla/show_bug.cgi?id=16573
> 
> --- Comment #1 from Kwok Yeung <kcy at codesourcery dot com> ---
> Created attachment 7410
>   --> https://sourceware.org/bugzilla/attachment.cgi?id=7410&action=edit
> Patch to temporarily undo all mtrace hooks
> 
> I think the easiest approach to fixing this is simply to undo all the hooks
> whenever an mtrace hook is called before proceeding, and redo them afterwards -
> I have attached a patch against the git master to do this. I suppose this might
> cause some memory errors to be missed in a multi-threaded program, but that is
> already somewhat the case already.
> 
A proper solution would be replace a mtrace with better tool, as hook
approach is not thread safe and implementation is quite slow.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]