RFR: 8323502: javac crash with wrongly typed method block in Flow
Aggelos Biboudis
abimpoudis at openjdk.org
Wed Jan 17 15:55:43 UTC 2024
The observation is that the `tree.target` of the RHS's `yield` was not set properly to point at the outer switch. As a result, the assertion was hit in `clearPendingExits` with a wrong set of pending exits.
The cause was that the `tree` was not attributed since `visitSwitchExpression` was short-circuited to `return;` and `visitYield` was never setting the `target`. As a result, `resolveJump` was not actually resolving the jump correctly.
thx @lahodaj for the help!
-------------
Commit messages:
- 8323502: javac crash with wrongly typed method block in Flow
Changes: https://git.openjdk.org/jdk/pull/17466/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17466&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8323502
Stats: 42 lines in 3 files changed: 39 ins; 0 del; 3 mod
Patch: https://git.openjdk.org/jdk/pull/17466.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/17466/head:pull/17466
PR: https://git.openjdk.org/jdk/pull/17466
More information about the compiler-dev
mailing list