[9] RFR (S): 8154172: C1: NPE is thrown instead of linkage error when invoking nonexistent method

Vladimir Kozlov vladimir.kozlov at oracle.com
Wed Apr 13 21:52:36 UTC 2016

Looks good to me. ciEnv.cpp cahnges looks empty. If it is only spacing 
changes we don't need to include them into bug fix.

Vladimir K

On 4/13/16 9:01 AM, Vladimir Ivanov wrote:
> http://cr.openjdk.java.net/~vlivanov/8154172/webrev.00/
> https://bugs.openjdk.java.net/browse/JDK-8154172
> C1 unconditionally inserts null check before doing a call, even if it
> throws an error during linkage. It contradicts JVMS which requires that
> linking errors precede run-time errors.
> The fix is to detect non-resolvable cases and avoid null checks /
> profiling altogether letting the runtime to throw a linkage error.
> Testing: regression test, JPRT, RBT (pit-hs-comp.js + jck).
> Some clarifications:
>     - klass->is_loaded() && !target->is_loaded() is true when method
> resolution fails;
>     - static vs non-static checks aren't needed because
> stream()->get_method already returns unloaded method in such case;
> Thanks!
> Best regards,
> Vladimir Ivanov

More information about the hotspot-compiler-dev mailing list