RFR (XS): 8027823: catchException combinator fails with 9 argument target
Vladimir Ivanov
vladimir.x.ivanov at oracle.com
Fri Nov 8 07:25:28 PST 2013
http://cr.openjdk.java.net/~vlivanov/8027823/webrev.00/
MethodHandleImpl.makeGuardWithCatch has special invokers
(GuardWithCatch.invoke_L*) for methods with arity up to 8.
When method arity is larger, generic invoker (GuardWithCatch.invoke_V)
is used.
Generic invoker expects GuardWithCatch.target & GuardWithCatch.catcher
method handles to have (Object... av)Object type, but they can reference
arbitrary methods, so type conversion is needed.
makeSpreadArguments takes care of parameters' type conversion, but
return type is left as is. That's the reason why GuardWithCatch.invoke_V
fails to invoke both target or catcher.
The fix is to add return type conversion on both paths.
Testing: failing test, test/java/lang/invoke/
Thanks!
Best regards,
Vladimir Ivanov
JBS: https://bugs.openjdk.java.net/browse/JDK-8027823
More information about the mlvm-dev
mailing list