mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-24 00:24:38 +00:00
LibJS: Fix ASAN poisoning range in new HeapBlocks
When poisoning HeapBlock::m_storage, we have to compute the storage size by excluding the HeapBlock header.
This commit is contained in:
@@ -36,7 +36,7 @@ HeapBlock::HeapBlock(Heap& heap, size_t cell_size)
|
||||
, m_cell_size(cell_size)
|
||||
{
|
||||
VERIFY(cell_size >= sizeof(FreelistEntry));
|
||||
ASAN_POISON_MEMORY_REGION(m_storage, block_size);
|
||||
ASAN_POISON_MEMORY_REGION(m_storage, block_size - sizeof(HeapBlock));
|
||||
}
|
||||
|
||||
void HeapBlock::deallocate(Cell* cell)
|
||||
|
||||
Reference in New Issue
Block a user