[9] RFR (S): 8154172: C1: NPE is thrown instead of linkage error when invoking nonexistent method
Vladimir Ivanov
vladimir.x.ivanov at oracle.com
Thu Apr 14 16:54:09 UTC 2016
Thanks, Vladimir.
Best regards,
Vladimir Ivanov
On 4/14/16 12:52 AM, Vladimir Kozlov wrote:
> 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.
>
> thanks,
> 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