-
Notifications
You must be signed in to change notification settings - Fork 5k
[mini] Dynamically allocate a buffer for large runtime invoke results #58215
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
Conversation
Tagging subscribers to this area: Issue DetailsIf the return type is a struct that's bigger than our buffer, malloc a Related to #58190
|
240fd42
to
40e0ca6
Compare
If the return type is a struct that's bigger than our buffer, malloc a buffer for it instead of using a fixed-size stack buffer
40e0ca6
to
ffa6cc9
Compare
Fixes various tests in InvokeRefReturnNetcoreTests
I think we want this for 6.0. |
/backport to release/6.0 |
Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/1182670893 |
Fixes dotnet#58957 Related to dotnet#58215 which was attempting to fix dotnet#58190
) * [mini] Use alloca for runtime_invoke retval buffer Fixes #58957 Related to #58215 which was attempting to fix #58190 * Set initial return buffer size to TARGET_SIZEOF_VOID_P In the common case we use the return buffer just to hold a pointer to the return value Co-authored-by: Aleksey Kliger <[email protected]> Co-authored-by: Aleksey Kliger <[email protected]>
If the return type is a struct that's bigger than our buffer, malloc a buffer for it instead of using a fixed-size stack buffer.
Also take the ref-return logic from #52501 and add it to the non-LLVM runtime-invoke
This makes the
System.Runtime
testsuite (particularlyInvokeRefReturnNetcoreTests
) pass on M1 MacCatalyst FullAOT.Related to #58190