RFR: 8351889: C2 crash: assertion failed: Base pointers must match (addp 344)

Emanuel Peter epeter at openjdk.org
Tue Jun 24 10:16:27 UTC 2025


On Tue, 24 Jun 2025 09:28:13 GMT, Roland Westrelin <roland at openjdk.org> wrote:

>> @rwestrel 
>>> Are the omitted inputs to AddPs that you'd like to see? Anything else?
>> 
>> I'm looking for the dump of all relevant nodes :)
>
>> I'm looking for the dump of all relevant nodes :)
> 
> https://bugs.openjdk.org/secure/attachment/115096/custom_debug.xml
> 
> is an igv file with one graph per step above. Does that help, @eme64 ?

@rwestrel Thanks for the file!

I fear that would also require me to dig through it myself, and extract the relevant information. I was hoping for a regular `node->dump` or `node->dump_bfs` of a limited graph in text form.

I can also do the digging myself, and look at the regression test in the debugger. That will take me more time that I probably won't have until mid August. I don't want to block this here though, maybe someone else has more time in these summer months :)

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

On the high level, this was you proposal:

>The fix I propose is to delay the call to PhiNode::unique_input()
with uncast = true if the Phi's inputs are cast nodes and have yet
to be processed by igvn. This causes identical CastPPs to common and
then only the Phi has 2 identical inputs is transformed to that
input (rather than have a new CastPPs be created at a different
control).

Does this delaying always work? Or could there be cases where we might not know how long to delay the Phi optimization, and then we are back to the same issue, just in a more complicated example? Or is there some sort of guarantee that the "non matching base pointers" can only occur during a IGVN phase, and MUST disappear at the end of it?

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

PR Comment: https://git.openjdk.org/jdk/pull/25386#issuecomment-2999677592


More information about the hotspot-compiler-dev mailing list