Branch: refs/heads/master Home: http://github.com/penberg/jato
Commit: 71fdcd96504061d59b2e465fa73e71372ba6e69a http://github.com/penberg/jato/commit/71fdcd96504061d59b2e465fa73e71372ba6e69a Author: Pekka Enberg <penb...@cs.helsinki.fi> Date: 2009-10-12 (Mon, 12 Oct 2009) Changed paths: M arch/x86/insn-selector.brg Log Message: ----------- x86: Fix instruction selector deadlock in invoke() The instruction selector can deadlock during compilation if method A invokes method B and the same method B also invokes method A. Fix that by using pthread_mutex_trylock() and treating the target method as not compiled of the mutex is under contention. Fixes the following deadlock found by helgrind: ==5206== Thread #1: lock order "0x4A4C0CC before 0x18A9F5A4" violated ==5206== at 0x40264B7: pthread_mutex_lock (hg_intercepts.c:408) ==5206== by 0x805ED27: mono_burg_emit (insn-selector.c:730) ==5206== by 0x80608F3: emit_code (insn-selector.c:874) ==5206== by 0x8060A57: select_instructions (insn-selector.c:925) ==5206== by 0x80652B6: compile (compiler.c:80) ==5206== by 0x806C4C9: jit_magic_trampoline (trampoline.c:97) ==5206== by 0x890640C: ??? ==5206== by 0x89069A3: ??? ==5206== by 0x4DAE7FF: ??? ==5206== by 0x4DAE7FF: ??? Acked-by: Tomek Grabiec <tgrab...@gmail.com> Signed-off-by: Pekka Enberg <penb...@cs.helsinki.fi> ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Jatovm-devel mailing list Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel