RFR: 8296912: C2: CreateExNode::Identity fails with assert(i < _max) failed: oob: i=1, _max=1
Tobias Hartmann
thartmann at openjdk.org
Wed Nov 16 12:07:53 UTC 2022
The fix for [JDK-8284358](https://bugs.openjdk.org/browse/JDK-8284358) added code that aggressively removes dead subgraphs when detecting an unreachable Region by walking up the CFG and replacing all nodes by top (because they must be unreachable as well). In this case, we detect that `280 Region` is unreachable from root and replace `276 Catch` by top while walking up the CFG:
![Screenshot from 2022-11-16 12-53-56](https://user-images.githubusercontent.com/5312595/202174104-9437914a-cb38-401c-b0fd-d6ca849969b0.png)
Code in `CreateExNode::Identity` does not expect `292 CatchProj` to have a top input when processing `305 CreateEx`. The fix is to simply add a `in(0)->in(0)->is_Catch()` check.
Thanks,
Tobias
-------------
Commit messages:
- 8296912: C2: CreateExNode::Identity fails with assert(i < _max) failed: oob: i=1, _max=1
Changes: https://git.openjdk.org/jdk/pull/11181/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11181&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8296912
Stats: 30 lines in 2 files changed: 23 ins; 1 del; 6 mod
Patch: https://git.openjdk.org/jdk/pull/11181.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/11181/head:pull/11181
PR: https://git.openjdk.org/jdk/pull/11181
More information about the hotspot-compiler-dev
mailing list