[wasm][coreclr] Disable remaining madvise calls on wasm#122920
Merged
radekdoulik merged 4 commits intodotnet:mainfrom Jan 8, 2026
Merged
[wasm][coreclr] Disable remaining madvise calls on wasm#122920radekdoulik merged 4 commits intodotnet:mainfrom
radekdoulik merged 4 commits intodotnet:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request disables remaining madvise system calls for WebAssembly (WASM) targets across both CoreCLR and native libraries. WebAssembly doesn't support madvise operations, so these calls need to be conditionally compiled out to prevent runtime issues.
Key changes:
- Added
!defined(TARGET_WASM)guards tomadvisecalls in native I/O and CoreCLR memory management code - Introduced early return in
GCToOSInterface::VirtualResetfor WASM targets - Updated conditional compilation for memory advise operations in PAL mapping code
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/native/libs/System.Native/pal_io.c |
Added TARGET_WASM exclusion to MADV_DONTFORK conditional compilation and updated corresponding comment |
src/coreclr/pal/src/map/map.cpp |
Extended platform exclusion in MAPMarkSectionAsNotNeeded to also skip WASM targets alongside Android |
src/coreclr/gc/unix/gcenv.unix.cpp |
Added WASM guards to multiple madvise calls in VirtualDecommit and VirtualReset, with early return optimization for WASM in VirtualReset |
AaronRobinsonMSFT
approved these changes
Jan 6, 2026
This was referenced Jan 6, 2026
jkotas
reviewed
Jan 6, 2026
jkotas
reviewed
Jan 6, 2026
This was referenced Jan 6, 2026
3 tasks
jkotas
reviewed
Jan 7, 2026
jkotas
reviewed
Jan 7, 2026
Co-authored-by: Jan Kotas <[email protected]>
This was referenced Jan 9, 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
No description provided.