Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
deps: V8: backport 6a0a25abaed3
Original commit message:

    [riscv] Fix sp handling in MacroAssembler::LeaveFrame

    Keep sp <= fp to ensure that data right above fp doesn't get clobbered
    by an inopportune signal and its handler.

    Such clobbering can happen in e.g. Node.js when JIT-compiled code is
    interrupted by a SIGCHLD handler.

    Bug: None
    Change-Id: Ief0836032ada7942e89f081f7605f61632c4d414
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7540554
    Reviewed-by: Ji Qiu <qiuji@iscas.ac.cn>
    Commit-Queue: Yahan Lu (LuYahan) <yahan@iscas.ac.cn>
    Reviewed-by: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#105069}

Refs: v8/v8@6a0a25a
Co-authored-by: kxxt <rsworktech@outlook.com>
  • Loading branch information
dramforever and kxxt committed Feb 4, 2026
commit 5993c41044f4998f072cfa411aa83ba9c2bd94e6
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.33',
'v8_embedder_string': '-node.34',

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

Expand Down
1 change: 1 addition & 0 deletions deps/v8/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ Vadim Gorbachev <bmsdave@gmail.com>
Varun Varada <varuncvarada@gmail.com>
Victor Costan <costan@gmail.com>
Victor Polevoy <fx@thefx.co>
Vivian Wang <wangruikang@iscas.ac.cn>
Vlad Burlik <vladbph@gmail.com>
Vladimir Krivosheev <develar@gmail.com>
Vladimir Shutoff <vovan@shutoff.ru>
Expand Down
3 changes: 2 additions & 1 deletion deps/v8/src/codegen/riscv/macro-assembler-riscv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5530,9 +5530,10 @@ void MacroAssembler::EnterFrame(StackFrame::Type type) {

void MacroAssembler::LeaveFrame(StackFrame::Type type) {
ASM_CODE_COMMENT(this);
addi(sp, fp, 2 * kSystemPointerSize);
Move(sp, fp);
LoadWord(ra, MemOperand(fp, 1 * kSystemPointerSize));
LoadWord(fp, MemOperand(fp, 0 * kSystemPointerSize));
AddWord(sp, sp, 2 * kSystemPointerSize);
}

void MacroAssembler::EnterExitFrame(int stack_space,
Expand Down
Loading