Skip to content

Commit 0781bd3

Browse files
dramforeverkxxt
authored 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 <[email protected]> Commit-Queue: Yahan Lu (LuYahan) <[email protected]> Reviewed-by: Rezvan Mahdavi Hezaveh <[email protected]> Cr-Commit-Position: refs/heads/main@{#105069} Refs: v8/v8@6a0a25a Co-authored-by: kxxt <[email protected]> PR-URL: #61688 Reviewed-By: Antoine du Hamel <[email protected]>
1 parent 35a12fb commit 0781bd3

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 <[email protected]>
282282
Varun Varada <[email protected]>
283283
Victor Costan <[email protected]>
284284
Victor Polevoy <[email protected]>
285+
Vivian Wang <[email protected]>
285286
Vlad Burlik <[email protected]>
286287
Vladimir Krivosheev <[email protected]>
287288
Vladimir Shutoff <[email protected]>

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)