Skip to content

Commit b7ecaa8

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 1107bda commit b7ecaa8

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
@@ -38,7 +38,7 @@
3838

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

4343
##### V8 defaults for Node.js #####
4444

deps/v8/AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ Vadim Gorbachev <bmsdave@gmail.com>
282282
Varun Varada <varuncvarada@gmail.com>
283283
Victor Costan <costan@gmail.com>
284284
Victor Polevoy <fx@thefx.co>
285+
Vivian Wang <wangruikang@iscas.ac.cn>
285286
Vlad Burlik <vladbph@gmail.com>
286287
Vladimir Krivosheev <develar@gmail.com>
287288
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
@@ -6036,9 +6036,10 @@ void MacroAssembler::EnterFrame(StackFrame::Type type) {
60366036

60376037
void MacroAssembler::LeaveFrame(StackFrame::Type type) {
60386038
ASM_CODE_COMMENT(this);
6039-
addi(sp, fp, 2 * kSystemPointerSize);
6039+
Move(sp, fp);
60406040
LoadWord(ra, MemOperand(fp, 1 * kSystemPointerSize));
60416041
LoadWord(fp, MemOperand(fp, 0 * kSystemPointerSize));
6042+
AddWord(sp, sp, 2 * kSystemPointerSize);
60426043
}
60436044

60446045
void MacroAssembler::EnterExitFrame(int stack_space,

0 commit comments

Comments
 (0)