RFR(S): 8154836: VM crash due to "Base pointers must match"

Doerr, Martin martin.doerr at sap.com
Mon Apr 25 11:04:28 UTC 2016

Hi all,

we have already seen such an assertion in final_graph_reshaping.

We found 2 AddP nodes in a row. The ideal graph looked like this (simplified):
N0 ConP
N1 ConN
N2 AddP(Base = N0, Address = N0)
N3 AddP(Base = N0, Address = N2)

Final graph reshaping visited N2 before N3 first and changed the graph:
N0 ConP
N1 ConN
N4 DecodeN
N2 AddP(Base = N4, Address = N4)
N3 AddP(Base = N0, Address = N2)

Afterwards, final graph reshaping visited N3 and ran into the assertion. The Base of N3 is unexpected.

I made a change to reconnect N3's Base input to N4, too.

Webrev is here:

In addition to fixing this problem, I added an assertion to check if there are more than 3 AddP nodes in a row.
I wouldn't expect that to happen. Not sure if this assertion is desired.

I made an additional change: I think the graph transformation doesn't make sense if decoding is expensive.
Therefore, I skip it on non-X86 platforms when we're running in heap based compressed oops mode.
(I believe X86 is the only platform which can match the decoding in the operand in this case.)

Please review. I will also need a sponsor, please.

Best regards,

More information about the hotspot-compiler-dev mailing list