Skip to content

Commit 5993c41

Browse files
dramforeverkxxt
andcommitted
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>
1 parent 8fdde5d commit 5993c41

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

common.gypi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
# Reset this number to 0 on major V8 upgrades.
3838
# Increment by one for each non-official patch applied to deps/v8.
39-
'v8_embedder_string': '-node.33',
39+
'v8_embedder_string': '-node.34',
4040

4141
##### V8 defaults for Node.js #####
4242

deps/v8/AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ Vadim Gorbachev <bmsdave@gmail.com>
264264
Varun Varada <varuncvarada@gmail.com>
265265
Victor Costan <costan@gmail.com>
266266
Victor Polevoy <fx@thefx.co>
267+
Vivian Wang <wangruikang@iscas.ac.cn>
267268
Vlad Burlik <vladbph@gmail.com>
268269
Vladimir Krivosheev <develar@gmail.com>
269270
Vladimir Shutoff <vovan@shutoff.ru>

deps/v8/src/codegen/riscv/macro-assembler-riscv.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5530,9 +5530,10 @@ void MacroAssembler::EnterFrame(StackFrame::Type type) {
55305530

55315531
void MacroAssembler::LeaveFrame(StackFrame::Type type) {
55325532
ASM_CODE_COMMENT(this);
5533-
addi(sp, fp, 2 * kSystemPointerSize);
5533+
Move(sp, fp);
55345534
LoadWord(ra, MemOperand(fp, 1 * kSystemPointerSize));
55355535
LoadWord(fp, MemOperand(fp, 0 * kSystemPointerSize));
5536+
AddWord(sp, sp, 2 * kSystemPointerSize);
55365537
}
55375538

55385539
void MacroAssembler::EnterExitFrame(int stack_space,

0 commit comments

Comments
 (0)