Skip to content

Commit

Permalink
jit: Fix all_exception_handlers_have_bb()
Browse files Browse the repository at this point in the history
The check "bb->start != eh->handler_pc all_exception_handlers_have_bb() is too
strict. Multiple exception handler can share the same basic block so make the
test reflect that.

This fixes an assertion failure with
sun.reflect.annotation.AnnotationInvocationHandler generated proxies.

Cc: Tomek Grabiec <tgrabiec@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
  • Loading branch information
penberg committed Dec 8, 2010
1 parent b011717 commit 5503ede
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jit/cfg-analyzer.c
Expand Up @@ -187,7 +187,7 @@ static bool all_exception_handlers_have_bb(struct compilation_unit *cu)
eh = &method->code_attribute.exception_table[i];
bb = find_bb(cu, eh->handler_pc);

if (bb == NULL || bb->start != eh->handler_pc)
if (bb == NULL || bb->start > eh->handler_pc || bb->end < eh->handler_pc)
return false;
}

Expand Down

0 comments on commit 5503ede

Please sign in to comment.