Commit e8c97924 authored by Michael Lippautz's avatar Michael Lippautz Committed by V8 LUCI CQ

cppgc: Adjust assert ensuring Oilpan generally satisfies alignof(std::max_align_t)

GCC on x86 wants alignof(std::max_align_t) == 16 which is not
supported by Oilpan. Stricter checks in
MakeGarbageCollectedTraitBase::Allocate() cover problems per type.

Bug: v8:12295
Change-Id: Icdd6517a2828280ed19279ca45004e26c99505a4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3229372
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: 's avatarAnton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77432}
parent 0c459ff5
......@@ -43,9 +43,6 @@ static constexpr size_t kDefaultAlignment = sizeof(void*);
// Maximum support alignment for a type as in `alignof(T)`.
static constexpr size_t kMaxSupportedAlignment = 2 * kDefaultAlignment;
static_assert(kMaxSupportedAlignment >= alignof(std::max_align_t),
"Maximum support alignment must at least cover "
"alignof(std::max_align_t).");
} // namespace api_constants
......
......@@ -21,6 +21,15 @@ namespace internal {
STATIC_ASSERT(api_constants::kLargeObjectSizeThreshold ==
kLargeObjectSizeThreshold);
#if !(defined(V8_TARGET_ARCH_32_BIT) && defined(V8_CC_GNU))
// GCC on x86 has alignof(std::max_alignt) == 16 (quad word) which is not
// satisfied by Oilpan.
static_assert(api_constants::kMaxSupportedAlignment >=
alignof(std::max_align_t),
"Maximum support alignment must at least cover "
"alignof(std::max_align_t).");
#endif // !(defined(V8_TARGET_ARCH_32_BIT) && defined(V8_CC_GNU))
// Using CPPGC_FORCE_ALWAYS_INLINE to guide LTO for inlining the allocation
// fast path.
// static
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment