From 770b7b9c4c2b11020c859852a87f09c0213bf55a Mon Sep 17 00:00:00 2001 From: Zoltan Varga Date: Thu, 26 Jan 2012 20:13:48 +0100 Subject: [PATCH] Fix support for synchronized methods + ldftn. Fixes #3088. --- mono/mini/mini-trampolines.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mono/mini/mini-trampolines.c b/mono/mini/mini-trampolines.c index f7083d6dc71..94edc054621 100644 --- a/mono/mini/mini-trampolines.c +++ b/mono/mini/mini-trampolines.c @@ -1252,8 +1252,9 @@ mono_create_jump_trampoline (MonoDomain *domain, MonoMethod *method, gboolean ad * We cannot recover the correct type of a shared generic * method from its native code address, so we use the * trampoline instead. + * For synchronized methods, the trampoline adds the wrapper. */ - if (code && !ji->has_generic_jit_info) + if (code && !ji->has_generic_jit_info && !(method->iflags & METHOD_IMPL_ATTRIBUTE_SYNCHRONIZED)) return code; mono_domain_lock (domain); -- 2.11.4.GIT