mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02: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:
Notes:
sideshowbarker
2024-07-18 21:34:51 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/57142a29a0a
@@ -64,9 +64,6 @@ void MallocTracer::target_did_malloc(Badge<Emulator>, FlatPtr address, size_t si
|
||||
VERIFY(is<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();
|
||||
memset(shadow_bits, 0, size);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user