-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Fix arguments passing in MethodDescCallSite::CallTargetWorker on wasm #119969
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix arguments passing in MethodDescCallSite::CallTargetWorker on wasm #119969
Conversation
Tagging subscribers to this area: @mangod9 |
I noticed that when I was fixing the other case with simple calls. The changes here should fix it, they lead to a new problem though, so it will need more work. Currently it crashes with
It wasn't crashing before probably because the call with 3 arguments to |
…lver To work with protable entrypoints
Now we are getting stack overflow, because of missing
Looks like it is not recognized as intrinsic method. |
This should be fixed here: runtime/src/coreclr/vm/methodtablebuilder.cpp Line 1546 in 6ef2af1
|
Now we get to the missing allocator. I will look at it tomorrow.
|
There was a problem hiding this 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 fixes an argument passing bug in MethodDescCallSite::CallTargetWorker
on WebAssembly where the wrong size was being set in the call description data, causing only one argument to be copied to the interpreter stack instead of all arguments.
Key changes:
- Implements the
StackElemSize
function for WASM to properly calculate stack element sizes - Fixes argument size calculation in
CallTargetWorker
to use the correctnStackBytes
value - Adds WASM support to hardware intrinsics handling and virtual call stub management
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
src/coreclr/vm/wasm/cgencpu.h | Implements StackElemSize function for WASM architecture |
src/coreclr/vm/callhelpers.cpp | Fixes argument size calculation in CallTargetWorker |
src/coreclr/vm/virtualcallstub.cpp | Adds conditional compilation for portable entrypoints on WASM |
src/coreclr/vm/methodtablebuilder.cpp | Extends hardware intrinsics support to include WASM architecture |
src/coreclr/vm/contractimpl.h | Disables fat token stress testing on WASM |
src/coreclr/runtime/portable/AllocFast.cpp | Implements RhpNewVariableSizeObject for WASM |
With the allocator in place, the initialization passes again. |
Co-authored-by: Jan Kotas <[email protected]>
/ba-g unrelated timeouts |
MethodDescCallSite::CallTargetWorker
was setting wrong size in the call description data, resulting in only one argument being copied to the interpreter stack.