RFR(S): 8219448: split-if update_uses accesses stale idom data
nils.eliasson at oracle.com
Thu Feb 28 19:48:49 UTC 2019
I just moved it up from line 570.
And on 575 we will call the replace on it, to finally kill it.
So the node is dead, we just must handle the phi-uses first, and while
doing that, a correct idom is required.
The code that triggers this bug has a diamond-shaped control flow below
the split-if-region. The region-nodes that need their idom corrected is
far down and isn't touched during the split. But there is a call down
there. It has one of its data edges defined by a phi hanging on the
split-region. So when we try to call spinup on it, it will traverse a
broken idom chain.
The conclusion of my investigation is that all regions that have the
split-region as its idom, must be updated (even if they are below). For
that we have the lazy_update mechanism, and to make it trigger, I must
mark the region as killed slightly earlier.
On 2019-02-28 20:00, Vladimir Kozlov wrote:
> Hi Nils,
> You are updating map so that next code in idom_no_update() works for you:
> Which seems a hack to me. I think we should fix spinup() method to
> skip old region when looking for idom (I assume that is where you have
> the problem).
> On 2/28/19 5:18 AM, Nils Eliasson wrote:
>> This patch fixes some of the idom updates in split-if. The updates
>> are there, but at the end, which is to late. They need to be correct
>> when handling the uses of the region being split. When the stale idom
>> is seen we end up asserting or crashing.
>> Please review,
>> Nils Eliasson
More information about the hotspot-compiler-dev