deps: V8: increase RISC-V trampoline pool gap#60909
Closed
AyushAnand-28 wants to merge 1 commit intonodejs:mainfrom
Closed
deps: V8: increase RISC-V trampoline pool gap#60909AyushAnand-28 wants to merge 1 commit intonodejs:mainfrom
AyushAnand-28 wants to merge 1 commit intonodejs:mainfrom
Conversation
Fixes: nodejs#60895 The error (trampoline_pos - fixup_pos) <= kMaxBranchOffset on RISC-V indicates that the trampoline pool is being emitted too late, causing branch targets to be out of range. This commit increases BlockPoolsScope::kGap in assembler-riscv.h from 16 slots to 32 slots. This increases the safety margin, ensuring that the trampoline pool is checked and emitted earlier, preventing the branch offset overflow.
Collaborator
|
Review requested:
|
Renegade334
requested changes
Dec 1, 2025
Member
Renegade334
left a comment
There was a problem hiding this comment.
There's no reason we would be merging ephemeral downstream V8 patches for an unsupported architecture.
If there's a jump issue in the V8 riscv assembler, it should be reported and addressed upstream.
Member
|
To clarify, we will accept backports/cherry-picks of upstream V8 fixes. See https://github.com/nodejs/node/blob/main/doc/contributing/maintaining/maintaining-V8.md#maintenance-process for the general policy and process. We have already accepted several fixes for riscv64. In this particular case, #60962 seems like a proper fix for the issue, while this one appears to be more of a band-aid. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #60895
The error
(trampoline_pos - fixup_pos) <= kMaxBranchOffseton RISC-Vindicates that the trampoline pool is being emitted too late, causing
branch targets to be out of range.
This commit increases
BlockPoolsScope::kGapinassembler-riscv.hfrom 16 slots to 32 slots. This increases the safety margin, ensuring
that the trampoline pool is checked and emitted earlier, preventing
the branch offset overflow.