mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03: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: https://github.com/SerenityOS/serenity/commit/f90a19ba4c9 Pull-request: https://github.com/SerenityOS/serenity/pull/7060 Issue: https://github.com/SerenityOS/serenity/issues/4592
@ -30,7 +30,7 @@ Heap::Heap(VM& vm)
|
||||
m_allocators.append(make<Allocator>(256));
|
||||
m_allocators.append(make<Allocator>(512));
|
||||
m_allocators.append(make<Allocator>(1024));
|
||||
m_allocators.append(make<Allocator>(3172));
|
||||
m_allocators.append(make<Allocator>(3072));
|
||||
}
|
||||
|
||||
Heap::~Heap()
|
||||
|
Loading…
Reference in New Issue
Block a user