This is the mail archive of the libc-help@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: debugging mallocs and per-thread tcache


On 12/01/2017 04:48 AM, Tom Horsley wrote:
> On Thu, 30 Nov 2017 18:28:42 -0800
> Carlos O'Donell wrote:
> 
>> Does that answer your question?
> 
> Yep, it all makes sense now and explains what I am seeing.
> Aside from LD_PRELOAD, when integrated into our debugger
> the debug malloc can work by patching in code at the entry
> points to the libc malloc routines. Since that gets hit
> without going through .plt (which allows it to work in
> a static linked program) then I see the calls from the
> cleanup code.
> 
> But if I can patch in code, I ought to be able to patch in
> a check for tcache_shutting_down true and ignore the error
> checking for free calls.
> 
> Thanks for the explanation!
 
You are welcome. Please feel free to come back and ask any
further questions.

We document malloc internals on the wiki here:
https://sourceware.org/glibc/wiki/MallocInternals

If there is anything that is missing from there, please
feel free to suggest some edits (which you can do yourself
if you go through the new wiki account process
https://sourceware.org/glibc/wiki/EditorGroup).

-- 
Cheers,
Carlos.


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