diff options
author | Andreas Kling <kling@serenityos.org> | 2020-07-16 19:27:03 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-07-16 19:27:03 +0200 |
commit | e50874621a86893eb5b267cca89203e9052093cd (patch) | |
tree | 29ea60ceb2be8020fa2b98cdc80110d835134654 /DevTools/UserspaceEmulator/MallocTracer.cpp | |
parent | 3dc1c809581cba246fe29afda5e2739e2c887b17 (diff) | |
download | serenity-e50874621a86893eb5b267cca89203e9052093cd.zip |
UserspaceEmulator: Don't scan text segment for malloc leaks
There will be no (true positive) malloc addresses in the text segment.
Diffstat (limited to 'DevTools/UserspaceEmulator/MallocTracer.cpp')
-rw-r--r-- | DevTools/UserspaceEmulator/MallocTracer.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/DevTools/UserspaceEmulator/MallocTracer.cpp b/DevTools/UserspaceEmulator/MallocTracer.cpp index 36bad55a19..72c183d99a 100644 --- a/DevTools/UserspaceEmulator/MallocTracer.cpp +++ b/DevTools/UserspaceEmulator/MallocTracer.cpp @@ -163,6 +163,8 @@ bool MallocTracer::is_reachable(const Mallocation& mallocation) const // Skip the stack if (region.is_stack()) return IterationDecision::Continue; + if (region.is_text()) + return IterationDecision::Continue; // Skip malloc blocks if (region.is_mmap() && static_cast<const MmapRegion&>(region).is_malloc_block()) return IterationDecision::Continue; |