Skip to content

[browser] Normalize dequeued jiterpreter method pointers - #134396

Merged
pavelsavara merged 1 commit into
mainfrom
lewing-validate-pr-131361-review
Sep 23, 2026
Merged

pavelsavara merged 1 commit into
mainfrom
lewing-validate-pr-131361-review

Conversation

@lewing

@lewing lewing commented Sep 22, 2026

Copy link
Copy Markdown
Member

The jiterpreter stores MonoMethod and InterpMethod pointers as unsigned JavaScript map keys, but mono_jiterp_tlqueue_next returns wasm i32 values 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 release
  • PATH="/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.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: e70c2b0-e9fc-4d2c-b478-167691bc4efb
@lewing
lewing requested a review from pavelsavara as a code owner September 22, 2026 04:00
Copilot AI lite review requested due to automatic review settings September 22, 2026 04:00
@azure-pipelines

Copy link
Copy Markdown
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.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @vitek-karas, @BrzVlad, @kotlarmilos
See info in area-owners.md if you want to be subscribed.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
pavelsavara merged commit 8e3a74e into main Sep 23, 2026
51 of 52 checks passed
@pavelsavara
pavelsavara deleted the lewing-validate-pr-131361-review branch September 23, 2026 08:44
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants