RFR (S): 8154172: C1: NPE is thrown instead of linkage error when invoking nonexistent method
vladimir.x.ivanov at oracle.com
Thu Apr 14 16:54:09 UTC 2016
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.
> Vladimir K
> On 4/13/16 9:01 AM, Vladimir Ivanov wrote:
>> 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;
>> Best regards,
>> Vladimir Ivanov
More information about the hotspot-compiler-dev