Commit 87ce4f5d authored by Joyee Cheung's avatar Joyee Cheung Committed by V8 LUCI CQ

[ic] use CSA_DCHECK in CodeStubAssembler::SharedValueBarrier

Since the code is generated unconditionally, using a DCHECK to check
that shared RO heap is enabled breaks builds with
v8_enable_shared_ro_heap set to false, this patch turns that into a
CSA_DCHECK so it only crashes when V8 actually attempts to store into
a shared struct while the RO heap isn't shared at run time.

Refs: https://github.com/nodejs/node/pull/42115
Bug: v8:12547
Change-Id: I30d9a02b98a0b647097125c0a9d141e40d6348cc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3561598Reviewed-by: 's avatarShu-yu Guo <syg@chromium.org>
Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Commit-Queue: Joyee Cheung <joyee@igalia.com>
Cr-Commit-Position: refs/heads/main@{#79756}
parent da9d6899
......@@ -15960,7 +15960,7 @@ void CodeStubAssembler::SharedValueBarrier(
GotoIf(TaggedIsSmi(value), &done);
// Fast path: Shared memory features imply shared RO space, so RO objects are
// trivially shared.
DCHECK(ReadOnlyHeap::IsReadOnlySpaceShared());
CSA_DCHECK(this, BoolConstant(ReadOnlyHeap::IsReadOnlySpaceShared()));
TNode<IntPtrT> page_flags = LoadBasicMemoryChunkFlags(CAST(value));
GotoIf(WordNotEqual(WordAnd(page_flags,
IntPtrConstant(BasicMemoryChunk::READ_ONLY_HEAP)),
......
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