mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-03 22:59:33 +00:00
LibJS: Make sure all allocators are 8-byte aligned
Absolutely massive allocations > 1024 bytes would go into the size class which was 3172 bytes. 3172 happens to not be 8 byte aligned, and so made UBSAN very sad on x86_64. Change the largest allocator to be 3072 bytes, which is in fact a multiple of 8 :^)
This commit is contained in:
parent
e1b8a2e517
commit
f90a19ba4c
Notes:
sideshowbarker
2024-07-18 18:11:12 +09:00
Author: https://github.com/ADKaster
Commit: f90a19ba4c
Pull-request: https://github.com/SerenityOS/serenity/pull/7060
Issue: https://github.com/SerenityOS/serenity/issues/4592
1 changed files with 1 additions and 1 deletions
|
@ -30,7 +30,7 @@ Heap::Heap(VM& vm)
|
||||||
m_allocators.append(make<Allocator>(256));
|
m_allocators.append(make<Allocator>(256));
|
||||||
m_allocators.append(make<Allocator>(512));
|
m_allocators.append(make<Allocator>(512));
|
||||||
m_allocators.append(make<Allocator>(1024));
|
m_allocators.append(make<Allocator>(1024));
|
||||||
m_allocators.append(make<Allocator>(3172));
|
m_allocators.append(make<Allocator>(3072));
|
||||||
}
|
}
|
||||||
|
|
||||||
Heap::~Heap()
|
Heap::~Heap()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue