DynamoRIO / drmemory

Memory Debugger for Windows, Linux, Mac, and Android
Other
2.45k stars 263 forks source link

free pre-us allocs and heaps for -replace_malloc #1195

Open derekbruening opened 10 years ago

derekbruening commented 10 years ago

From bruen...@google.com on April 25, 2013 22:04:29

pre-us allocs are currently leaked. normally there are at most a few hundred. but for attach this is not an acceptable solution.

call native free? but if replacing many layers can we call RtlFree in place of any of them? need to record which layer they're in (want to do that for issue #607 A too).

*\ TODO attach or late injection: HeapDestroy on heap w/ mixtures of pre-us and post-us allocs!

for a Heap that exists before we take over, we'll need to invoke the real RtlDestroyHeap

Original issue: http://code.google.com/p/drmemory/issues/detail?id=1195

derekbruening commented 10 years ago

From bruen...@google.com on May 29, 2013 11:42:04

if we call the native free, how do we stop DR's privlib isolation from redirecting? xref drmem's heap walk Rtl routines ( issue #1256 )