Skip to content

Conversation

@lambdageek
Copy link
Member

Fixes #58957
Related to #58215 which was attempting to
fix #58190

@ghost ghost added the area-VM-meta-mono label Sep 11, 2021
@ghost
Copy link

ghost commented Sep 11, 2021

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

Issue Details

Fixes #58957
Related to #58215 which was attempting to
fix #58190

Author: lambdageek
Assignees: -
Labels:

area-VM-meta-mono

Milestone: -

gboolean retval_malloc = FALSE;
gpointer retval_ptr;
guint8 retval [MONO_SIZEOF_DYN_CALL_RET_BUF];
int32_t retval_size = MONO_SIZEOF_DYN_CALL_RET_BUF;
Copy link
Member

Choose a reason for hiding this comment

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

Could the initial size be SIZEOF_VOID_P in order to avoid unnecessary stack allocation ?

In the common case we use the return buffer just to hold a pointer to
the return value
@lambdageek
Copy link
Member Author

/backport to release/6.0

@github-actions
Copy link
Contributor

Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/1227523946

@lambdageek lambdageek merged commit 206dba7 into dotnet:main Sep 12, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Nov 3, 2021
@lambdageek lambdageek deleted the fix-gh-58957 branch March 19, 2022 16:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[mono] Possible GC hole in runtime invoke Mono: handle structs larger than 256 bytes correctly

3 participants