fixup_direct_calls() should be called whenever return address (ret) is not NULL, it should not depend on whether compilation unit is marked as compiled. That's because native methods are never marked as compiled and yet we can fixup the calls.
Signed-off-by: Tomek Grabiec <tgrab...@gmail.com> --- jit/trampoline.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/jit/trampoline.c b/jit/trampoline.c index 1fe6503..833a7d5 100644 --- a/jit/trampoline.c +++ b/jit/trampoline.c @@ -112,7 +112,7 @@ void *jit_magic_trampoline(struct compilation_unit *cu) * Therefore, do fixup for direct call sites unconditionally and fixup * vtables if method can be invoked via invokevirtual. */ - if (cu->is_compiled) + if (ret) fixup_direct_calls(method->trampoline, (unsigned long) ret); pthread_mutex_unlock(&cu->mutex); -- 1.6.0.6 ------------------------------------------------------------------------------ _______________________________________________ Jatovm-devel mailing list Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel