diff options
author | Vlad Brezae <brezaevlad@gmail.com> | 2021-04-13 20:13:30 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-13 20:13:30 +0300 |
commit | c90ec48f596c5d18c07724c749fa13c5ad07161d (patch) | |
tree | 0c51d5631e0028dc249367a5e3d91d919681efa3 | |
parent | b4a385816ed4f1398d0184c38f19f560e868fd80 (diff) |
[arm64] Fix wrong marshalling in gsharedvt transition (#21006)mono-6.12.0.138
Transitioning from ArgVtypeByRefOnStack to ArgVtypeByRef requires no marshalling. The reference ends up being saved on stack the same way and the stack slot just needs to be copied (in mono_arm_start_gsharedvt_call).
-rw-r--r-- | mono/mini/mini-arm64-gsharedvt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mono/mini/mini-arm64-gsharedvt.c b/mono/mini/mini-arm64-gsharedvt.c index 67689024464..f3a0653a03a 100644 --- a/mono/mini/mini-arm64-gsharedvt.c +++ b/mono/mini/mini-arm64-gsharedvt.c @@ -229,7 +229,7 @@ mono_arch_get_gsharedvt_call_info (gpointer addr, MonoMethodSignature *normal_si } if (ainfo2->storage == ArgVtypeByRef && ainfo2->gsharedvt) { /* Pass the address of the first src slot in a reg */ - if (ainfo->storage != ArgVtypeByRef) { + if (ainfo->storage != ArgVtypeByRef && ainfo->storage != ArgVtypeByRefOnStack) { if (ainfo->storage == ArgHFA && ainfo->esize == 4) { arg_marshal = GSHAREDVT_ARG_BYVAL_TO_BYREF_HFAR4; g_assert (src [0] < 64); @@ -244,7 +244,7 @@ mono_arch_get_gsharedvt_call_info (gpointer addr, MonoMethodSignature *normal_si dst [0] = map_reg (ainfo2->reg); } else if (ainfo2->storage == ArgVtypeByRefOnStack && ainfo2->gsharedvt) { /* Pass the address of the first src slot in a stack slot */ - if (ainfo->storage != ArgVtypeByRef) + if (ainfo->storage != ArgVtypeByRef && ainfo->storage != ArgVtypeByRefOnStack) arg_marshal = GSHAREDVT_ARG_BYVAL_TO_BYREF; ndst = 1; dst = g_new0 (int, 1); |