(M) RFR: 8200167: Validate more special case invocations
Tobias Hartmann
tobias.hartmann at oracle.com
Fri Apr 27 06:42:56 UTC 2018
Hi David,
On 27.04.2018 00:04, David Holmes wrote:
>> src/hotspot/share/c1/c1_Canonicalizer.cpp
>> ...
>> void Canonicalizer::do_CheckCast (CheckCast* x) {
>> - if (x->klass()->is_loaded()) {
>> + if (x->klass()->is_loaded() && !x->is_invokespecial_receiver_check())
>>
>> It seems like it's not something specific to invokespecial, but a generic problem in how interface
>> casts are handled in C1: it's not correct to eliminate the cast if obj->declared_type() is an
>> interface. I assume that's what happens in your case. FTR I'm fine with handling it separately.
>
> The above came from Tobias. If you think there is a more general issue here then we should file a
> separate bug and formulate a test case.
To clarify, I've quickly debugged this problem before going on vacation and rather than a full fix,
the intention of the above change was to quickly verify that the problem is indeed an incorrectly
eliminated receiver cast.
I'm also fine with handling this in a separate bug or to push this as a quick fix and file a follow
up bug for further investigation if other changes are necessary.
Thanks,
Tobias
More information about the core-libs-dev
mailing list