Skip to content

Conversation

AaronRobinsonMSFT
Copy link
Member

Disable finalizer creation logic when targeting WASM.
Disable EnableFinalizer trigger method when targeting WASM.
Disable new stub precode heap. This removes use of InterleavedLoaderHeap.
Fixes #117501

@AaronRobinsonMSFT AaronRobinsonMSFT added this to the 11.0.0 milestone Sep 4, 2025
@AaronRobinsonMSFT AaronRobinsonMSFT added the arch-wasm WebAssembly architecture label Sep 4, 2025
@Copilot Copilot AI review requested due to automatic review settings September 4, 2025 21:37
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR disables finalizer and stub precode heap functionality when targeting WebAssembly (WASM) to address runtime issues and simplify the WASM-specific code path. The changes ensure that WASM builds avoid unnecessary threading and heap management complexity.

  • Disables the creation of InterleavedLoaderHeap for stub precode when portable entry points are used
  • Prevents finalizer thread enablement on WASM targets
  • Reorganizes finalizer thread creation logic to clearly separate Windows, WASM, and other platform behaviors

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/coreclr/vm/loaderallocator.cpp Guards new stub precode heap creation with FEATURE_PORTABLE_ENTRYPOINTS
src/coreclr/vm/finalizerthread.cpp Disables finalizer enablement for WASM targets
src/coreclr/vm/ceemain.cpp Restructures finalizer thread initialization logic with clearer platform-specific conditionals

Copy link
Contributor

Tagging subscribers to this area: @mangod9
See info in area-owners.md if you want to be subscribed.

@pavelsavara
Copy link
Member

/ba-g CI failure unrelated

@AaronRobinsonMSFT AaronRobinsonMSFT merged commit a3b607a into dotnet:main Sep 5, 2025
95 of 98 checks passed
@AaronRobinsonMSFT AaronRobinsonMSFT deleted the wasm_nits branch September 5, 2025 13:43
@github-actions github-actions bot locked and limited conversation to collaborators Oct 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-wasm WebAssembly architecture area-VM-coreclr

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[wasm coreclr] Stop using interleaved LoaderHeap on wasm

3 participants