deps: V8: cherry-pick 1158ae719749#64432
Open
Renegade334 wants to merge 1 commit into
Open
Conversation
Original commit message:
[wasm] Fix jump table slot overflow on x64 with CET enabled
JumpTableAssembler::EmitJumpSlot for x64 was advancing the PC before
checking if the target was reachable via a 32-bit displacement when CET
was enabled. This caused a slot overflow when the far-jump fallback was
triggered, as the second attempt to emit the slot would start at an
incorrect offset.
This CL ensures that the displacement check is performed before any
instructions are emitted, making the function side-effect-free on
failure. It also introduces kJumpTableSlotEntryMarkerSize to clarify
the displacement calculation, following the pattern used on ARM64.
Reported-by: Fabien Romano <fabienromano@gmail.com>
TAG=agy
R=jkummerow@chromium.org
Fixed: 532112743
Change-Id: Iaf6f15b51a66a45711e8556972ac0d353e6117c7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8063803
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#108556}
Refs: v8/v8@1158ae7
Collaborator
|
Review requested:
|
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.
Lands cleanly, and is zero-impact for standard (non-CET) builds.
@VlkrS: are you in a position to test a V8_ENABLE_CET_IBT build?
Fixes: #64424