[jdk18] RFR: 8277447: Hotspot C1 compiler crashes on Kotlin suspend fun with loop
Igor Veresov
iveresov at openjdk.java.net
Thu Dec 16 23:03:56 UTC 2021
There are a bunch of problems with `BlockListBuilder::mark_loops()` and how it handles irreducible loops. It doesn't really seem to be explicitly designed to handle those, however, it does handle most. One shape emitted by the Kotlin compiler in this particular case gives it trouble.
The proper fix is to rewrite loop detection, detect irreducible loops, and switch off `SelectivePhiFunctions` is any are present. But given that we're close to the release, I'd like to add a bailout during phi insertion, and file an RFE to do the proper fix later.
I wrote a minimal test to demonstrate the issue.
Testing with hs-tier{1-7} is squeaky clean.
-------------
Commit messages:
- Remove tabs
- Bailout during phi placement if odd control flow is present
Changes: https://git.openjdk.java.net/jdk18/pull/40/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk18&pr=40&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8277447
Stats: 121 lines in 3 files changed: 121 ins; 0 del; 0 mod
Patch: https://git.openjdk.java.net/jdk18/pull/40.diff
Fetch: git fetch https://git.openjdk.java.net/jdk18 pull/40/head:pull/40
PR: https://git.openjdk.java.net/jdk18/pull/40
More information about the hotspot-compiler-dev
mailing list