RFR: 8371716: C2: Phi node fails Value()'s verification when speculative types clash [v4]

Marc Chevalier mchevalier at openjdk.org
Thu Nov 27 12:37:56 UTC 2025


On Thu, 27 Nov 2025 12:09:30 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Marc Chevalier has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision:
>> 
>>  - test
>>  - Merge branch 'master' into JDK-8371716
>>  - More test
>>  - IgnoreUnrecognizedVMOptions
>>  - Fix bug number
>>  - Filter twice
>
> src/hotspot/share/opto/cfgnode.cpp line 1407:
> 
>> 1405:     assert(false, "computed type would not pass verification");
>> 1406:   }
>> 1407: #endif
> 
> You could consider moving this to a seperate verification method, but up to you.
> 
> It is also very verbose. I wonder if it really makes sense to have that much code. But again: up to you.
> 
> You could also make your dump less verbose, and then format it directly into the assert. The benefit would be that if a fuzzer finds such a failure we would see more directly what's going on.

To be fair, it's not printing as much as it looks like. This is verbose because I cannot write


ss.print_cr("t: %s", t->to_string());

or something like

ss.print_cr("t: %magic", pp_type, t);

for

ss.print("t: ");
t->dump_on(&ss);
ss.print_cr("");


I'm rather tempted to keep it as it is (or close), because that it the kind of information I wanted to see when I was working on that. I suspect if the assert fails and someone has to look at that again, they might find the same information useful as well.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/28331#discussion_r2568463171


More information about the hotspot-compiler-dev mailing list