[jdk16] RFR: 8253954: javac crash when compiling code with enhanced switch expressions with option -Xjcov

Vicente Romero vromero at openjdk.java.net
Wed Dec 23 20:31:02 UTC 2020


Please review this one liner patch that is fixing a crash in javac when compiling with option `-Xjcov`. The crash was due to an assertion failure at `com.sun.tools.javac.jvm.CRTable` as no position was found for compiler generated `yield` trees in some cases. The fix is to visit the `value` expression in the `yield` tree so that when the CRT table is being generated, the position for the `yield` tree is not `null`

TIA

-------------

Commit messages:
 - Merge branch 'master' into JDK-8253954
 - 8253954: javac crash when compiling code with enhanced switch expressions with option -Xjcov

Changes: https://git.openjdk.java.net/jdk16/pull/66/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk16&pr=66&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8253954
  Stats: 45 lines in 2 files changed: 45 ins; 0 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk16/pull/66.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk16 pull/66/head:pull/66

PR: https://git.openjdk.java.net/jdk16/pull/66


More information about the compiler-dev mailing list