Skip to content

Commit

Permalink
deps: V8: cherry-pick 87ce4f5d98a5
Browse files Browse the repository at this point in the history
Original commit message:

    [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: nodejs#42115
    Bug: v8:12547
    Change-Id: I30d9a02b98a0b647097125c0a9d141e40d6348cc
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3561598
    Reviewed-by: Shu-yu Guo <[email protected]>
    Reviewed-by: Leszek Swirski <[email protected]>
    Commit-Queue: Joyee Cheung <[email protected]>
    Cr-Commit-Position: refs/heads/main@{#79756}

Refs: v8/v8@87ce4f5
  • Loading branch information
targos committed Apr 9, 2022
1 parent 2381fd8 commit c78cf3e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.7',
'v8_embedder_string': '-node.8',

##### V8 defaults for Node.js #####

Expand Down
2 changes: 1 addition & 1 deletion deps/v8/src/codegen/code-stub-assembler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15953,7 +15953,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)),
Expand Down

0 comments on commit c78cf3e

Please sign in to comment.