1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:18:11 +00:00

UserspaceEmulator: Don't scan text segment for malloc leaks

There will be no (true positive) malloc addresses in the text segment.
This commit is contained in:
Andreas Kling 2020-07-16 19:27:03 +02:00
parent 3dc1c80958
commit e50874621a
3 changed files with 8 additions and 0 deletions

View file

@ -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;