Skip to content
This repository has been archived by the owner on Sep 15, 2021. It is now read-only.

Commit

Permalink
x86-64: Fix infinite loop in compiler when method is missing
Browse files Browse the repository at this point in the history
Don't add the same call instruction twice to the compilation unit;
otherwise the compile will enter an infinite loop in the liveness
analysis.

Signed-off-by: Pekka Enberg <penberg@kernel.org>
  • Loading branch information
penberg committed Mar 10, 2013
1 parent db0c745 commit 4c43f40
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions arch/x86/insn-selector_64.brg
Original file line number Diff line number Diff line change
Expand Up @@ -2559,8 +2559,6 @@ static void invokevirtual(struct _MBState *state, struct basic_block *s, struct

if (vm_method_is_missing(method)) {
call_insn = rel_insn(INSN_CALL_REL, (unsigned long) jit_no_such_method_stub);

select_safepoint_insn(s, tree, call_insn);
} else {
/* object reference */
call_target = state->left->reg1;
Expand Down Expand Up @@ -2604,8 +2602,6 @@ static void invokeinterface(struct _MBState *state, struct basic_block *s, struc

if (vm_method_is_missing(method)) {
call_insn = rel_insn(INSN_CALL_REL, (unsigned long) jit_no_such_method_stub);

select_safepoint_insn(s, tree, call_insn);
} else {
/* object reference */
call_target = state->left->reg1;
Expand Down
2 changes: 1 addition & 1 deletion tools/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
, ( "jvm.MethodInvocationExceptionsTest", 0, NO_SYSTEM_CLASSLOADER, [ "i386", "x86_64" ] )
, ( "jvm.MultithreadingTest", 0, [ ], [ "i386", "x86_64" ] )
, ( "jvm.MethodOverridingFinal", 1, NO_SYSTEM_CLASSLOADER, [ "i386", "x86_64" ] )
, ( "jvm.NoSuchMethodErrorTest", 0, NO_SYSTEM_CLASSLOADER, [ "i386" ] )
, ( "jvm.NoSuchMethodErrorTest", 0, NO_SYSTEM_CLASSLOADER, [ "i386", "x86_64" ] )
, ( "jvm.ObjectArrayTest", 0, NO_SYSTEM_CLASSLOADER, [ "i386", "x86_64" ] )
, ( "jvm.ObjectCreationAndManipulationExceptionsTest", 0, NO_SYSTEM_CLASSLOADER, [ "i386", "x86_64" ] )
, ( "jvm.ObjectCreationAndManipulationTest", 0, NO_SYSTEM_CLASSLOADER, [ "i386", "x86_64" ] )
Expand Down

0 comments on commit 4c43f40

Please sign in to comment.