[jdk8u-dev] RFR: 8303466: C2: failed: malformed control flow. Limit type made precise with MaxL/MinL
Francisco Ferrari Bihurriet
fferrari at openjdk.org
Tue Jul 2 14:18:27 UTC 2024
On Tue, 2 Jul 2024 12:07:13 GMT, Francisco Ferrari Bihurriet <fferrari at openjdk.org> wrote:
>> Compilation didn't fail because not all the warnings are enabled.
>>
>> Enabling `-Woverloaded-virtual` causes a number of warnings like the following:
>>
>> hotspot/src/share/vm/opto/addnode.hpp:50:17: error: ‘virtual Node* AddNode::Identity(PhaseTransform*)’ was hidden [-Werror=overloaded-virtual]
>> 50 | virtual Node *Identity( PhaseTransform *phase );
>> hotspot/src/share/vm/opto/addnode.hpp:312:17: error: by ‘virtual Node* MinLNode::Identity(PhaseGVN*)’ [-Werror=overloaded-virtual]
>> 312 | virtual Node* Identity(PhaseGVN* phase);
>>
>> that may point to a serious bug.
>>
>> In few words, `MinLNode::Identity` may be never called in case:
>>
>> AddNode *obj = new MinLNode;
>> obj->Identity(...); // AddNode::Identity() is called.
>
> You are right, I was missing the `MaxLNode`←`MaxNode`←`AddNode` inheritance and the fact that `MaxLNode::Identity(PhaseGVN* phase)` doesn't override but hides `AddNode::Identity(PhaseTransform* phase)`, sorry for the confusion.
>
> After my comment, we continued analyzing it with @martinuy and arrived to similar conclusions. We'll be proposing a fix for this later today.
As this pull request is already integrated, I have created the [JDK-8335552: [8u] JDK-8303466 backport to 8u requires 3 ::Identity signature fixes](https://bugs.openjdk.org/browse/JDK-8335552) follow up.
-------------
PR Review Comment: https://git.openjdk.org/jdk8u-dev/pull/529#discussion_r1662619926
More information about the jdk8u-dev
mailing list