https://bugs.webkit.org/show_bug.cgi?id=155896
Reviewed by Andreas Kling.
We normally filter zero-sized allocations into small allocations, but
a zero-sized allocation can sneak through if it requires sufficiently
large alignment.
* bmalloc/Heap.cpp:
(bmalloc::Heap::tryAllocateXLarge): Set a floor on allocation size to
catch zero-sized allocations.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@198680
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2016-03-25 Geoffrey Garen <ggaren@apple.com>
+
+ bmalloc: stress_aligned fails when allocating a zero-sized object with XLarge alignment
+ https://bugs.webkit.org/show_bug.cgi?id=155896
+
+ Reviewed by Andreas Kling.
+
+ We normally filter zero-sized allocations into small allocations, but
+ a zero-sized allocation can sneak through if it requires sufficiently
+ large alignment.
+
+ * bmalloc/Heap.cpp:
+ (bmalloc::Heap::tryAllocateXLarge): Set a floor on allocation size to
+ catch zero-sized allocations.
+
2016-03-25 Geoffrey Garen <ggaren@apple.com>
bmalloc: Renamed LargeChunk => Chunk
m_isAllocatingPages = true;
+ size = std::max(vmPageSize, size);
alignment = roundUpToMultipleOf<xLargeAlignment>(alignment);
XLargeRange range = m_xLargeMap.takeFree(alignment, size);