[jdk17] RFR: 8269641: assert(tmp == _callprojs.fallthrough_catchproj) failed: allocation control projection
Nils Eliasson
neliasso at openjdk.java.net
Thu Jul 1 11:15:12 UTC 2021
When I investigated this bug I found out it was already fixed by JDK-8268405, or at least - it didn't happen any more. Since I had a good reproducer I took a look at why it happened and found two issues.
The noteable thing about the test case is that there are still allocations that isn't used. The initalizeNode lead to HaltNodes. This looks like a temporary state while the graph is simplified.
1) In macro.cpp - process_users_of_allocation - there was an assert that was wrong. We must assert before the replace_node - otherwise tmp will always be NULL and fail. Why this hasn't happened before is a mystery.
2) memnode.cpp - MemBarNode::remove - returns without doing anything if there are not exactly 2 outs. In this case there is a InitalizeNode that leads to a HaltNode. The memory uses has been removed - so the memory projection from the InitalizeNode is already removed.
If you want to check if this patch fixes the issue - you need to sync to jdk-17+26 - or before the fix for JDK-8268405.
Please review,
Nils Eliasson
-------------
Commit messages:
- Remove ws
- Fix proj handling
Changes: https://git.openjdk.java.net/jdk17/pull/193/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk17&pr=193&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8269641
Stats: 10 lines in 2 files changed: 6 ins; 1 del; 3 mod
Patch: https://git.openjdk.java.net/jdk17/pull/193.diff
Fetch: git fetch https://git.openjdk.java.net/jdk17 pull/193/head:pull/193
PR: https://git.openjdk.java.net/jdk17/pull/193
More information about the hotspot-compiler-dev
mailing list