[browser] Normalize dequeued jiterpreter method pointers - #134396
Merged
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: e70c2b0-e9fc-4d2c-b478-167691bc4efb
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @vitek-karas, @BrzVlad, @kotlarmilos |
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
No unresolved blocking issues were identified.
Review effort: Lite
Findings: None
What changed in this PR
Normalizes dequeued WebAssembly method pointers so jiterpreter map lookups work for addresses above 2 GB.
Changes:
- Normalize interp-entry queue pointers.
- Normalize JIT-call queue pointers.
| File | Description |
|---|---|
src/mono/browser/runtime/jiterpreter-jit-call.ts |
Normalizes JIT-call queue method pointers. |
src/mono/browser/runtime/jiterpreter-interp-entry.ts |
Normalizes interpreter-entry queue method pointers. |
pavelsavara
approved these changes
Sep 22, 2026
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.
The jiterpreter stores
MonoMethodandInterpMethodpointers as unsigned JavaScript map keys, butmono_jiterp_tlqueue_nextreturns wasmi32values as signed JavaScript numbers. For metadata allocated above 2 GB, the queue-drain lookup therefore misses and permanently skips compiling the associated trampoline.Normalize dequeued pointers before looking them up in both the interp-entry and JIT-call maps. This follows up on the pointer signedness changes from #121221 and addresses the issue identified while reviewing the release/10.0 backport in #131361.
Validation:
PATH="/opt/homebrew/bin:$PATH" ./build.sh mono+libs -os browser -c releasePATH="/opt/homebrew/bin:$PATH" make -C src/mono/browser run-build-tests CONFIG=Release MSBUILD_ARGS='/p:RuntimeFlavor=Mono /p:PackageVersionForWorkloadManifests=12.0.0-dev /p:XUnitMethodName=Wasm.Build.Tests.MemoryTests.AllocateLargeHeapThenRepeatedlyInterop'Note
This pull request description was generated with GitHub Copilot.