[release/6.0] [mini] Use alloca for runtime_invoke retval buffer (#59006)
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Mon, 13 Sep 2021 16:52:00 +0000 (09:52 -0700)
committerGitHub <noreply@github.com>
Mon, 13 Sep 2021 16:52:00 +0000 (09:52 -0700)
commit8fe648d65ff5e04cbd503ed847f2705800e84e68
tree6cf01e0c8addba37013f8b467432528305267539
parent188bfd8a752a13061e56d7539579c92ab4e5c85c
[release/6.0] [mini] Use alloca for runtime_invoke retval buffer (#59006)

* [mini] Use alloca for runtime_invoke retval buffer

Fixes https://github.com/dotnet/runtime/issues/58957
Related to https://github.com/dotnet/runtime/pull/58215 which was attempting to
fix https://github.com/dotnet/runtime/issues/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 <alklig@microsoft.com>
Co-authored-by: Aleksey Kliger <aleksey@lambdageek.org>
src/mono/mono/mini/mini-runtime.c