mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 19:27:45 +00:00
UserspaceEmulator: Don't set the MmapRegion malloc-block bit too early
We were setting it before the malloc metadata had been instantiated. Fixes #5707.
This commit is contained in:
parent
1381720d1d
commit
57142a29a0
1 changed files with 0 additions and 3 deletions
|
@ -64,9 +64,6 @@ void MallocTracer::target_did_malloc(Badge<Emulator>, FlatPtr address, size_t si
|
||||||
VERIFY(is<MmapRegion>(*region));
|
VERIFY(is<MmapRegion>(*region));
|
||||||
auto& mmap_region = static_cast<MmapRegion&>(*region);
|
auto& mmap_region = static_cast<MmapRegion&>(*region);
|
||||||
|
|
||||||
// Mark the containing mmap region as a malloc block!
|
|
||||||
mmap_region.set_malloc(true);
|
|
||||||
|
|
||||||
auto* shadow_bits = mmap_region.shadow_data() + address - mmap_region.base();
|
auto* shadow_bits = mmap_region.shadow_data() + address - mmap_region.base();
|
||||||
memset(shadow_bits, 0, size);
|
memset(shadow_bits, 0, size);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue