(M) RFR: 8200167: Validate more special case invocations (original) (raw)
Tobias Hartmann tobias.hartmann at oracle.com
Fri Apr 27 06:42:56 UTC 2018
- Previous message: (M) RFR: 8200167: Validate more special case invocations
- Next message: (M) RFR: 8200167: Validate more special case invocations
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi David,
On 27.04.2018 00:04, David Holmes wrote:
src/hotspot/share/c1/c1Canonicalizer.cpp ... void Canonicalizer::doCheckCast (CheckCast* x) { - if (x->klass()->isloaded()) { + if (x->klass()->isloaded() && !x->isinvokespecialreceivercheck())
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->declaredtype() 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
- Previous message: (M) RFR: 8200167: Validate more special case invocations
- Next message: (M) RFR: 8200167: Validate more special case invocations
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]