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 b441a50a4c47777658c964e65d60ff8af8c920e9
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,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.11',
'v8_embedder_string': '-node.12',

##### 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 @@ -305,6 +305,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 Kempik <vladimir.kempik@syntacore.com>
Vladimir Krivosheev <develar@gmail.com>
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 @@ -6846,9 +6846,10 @@ void MacroAssembler::EnterFrame(StackFrame::Type type) {

void MacroAssembler::LeaveFrame(StackFrame::Type type) {
ASM_CODE_COMMENT(this);
AddWord(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(Register scratch, int stack_space,
Expand Down
Loading