From 7281349206c09e0098ae0e4184f2b46225f85b1e Mon Sep 17 00:00:00 2001 From: monojenkins Date: Mon, 10 Aug 2020 08:31:04 -0400 Subject: [PATCH] [aot] Fix the handling of r4/r8 parameter types with attributes during generic sharing. (#40498) The attributes need to be ignored as with the other types, otherwise gsharedvt wrappers for signatures with parameters like double f = default will not be found. Fixes https://github.com/mono/mono/issues/20195. Co-authored-by: vargaz --- src/mono/mono/mini/mini-generic-sharing.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mono/mono/mini/mini-generic-sharing.c b/src/mono/mono/mini/mini-generic-sharing.c index 5fb8bbb39c96e..86f7066ec59dd 100644 --- a/src/mono/mono/mini/mini-generic-sharing.c +++ b/src/mono/mono/mini/mini-generic-sharing.c @@ -1276,6 +1276,10 @@ get_wrapper_shared_type_full (MonoType *t, gboolean is_field) #else return m_class_get_byval_arg (mono_defaults.uint32_class); #endif + case MONO_TYPE_R4: + return m_class_get_byval_arg (mono_defaults.single_class); + case MONO_TYPE_R8: + return m_class_get_byval_arg (mono_defaults.double_class); case MONO_TYPE_OBJECT: case MONO_TYPE_CLASS: case MONO_TYPE_SZARRAY: