AssertionError during LVT generation with javac 8u20

Liam Miller-Cushon cushon at google.com
Thu Oct 9 00:55:38 UTC 2014


Thanks Vicente, I meant to test against JDK 9 but clearly did not. Sorry
for the duplicate.

It turns out that I actually ran into JDK-8058708, and while trying to make
a smaller test case I produced a repro for JDK-8047719 instead. This patch
fixed the issue we were seeing:
http://hg.openjdk.java.net/jdk8u/jdk8u-dev/langtools/rev/31d2a837676f

On Wed, Oct 8, 2014 at 2:01 PM, Vicente-Arturo Romero-Zaldivar <
vicente.romero at oracle.com> wrote:

>  Hi Liam,
>
> Thanks for your mail and for the reduced test case. The issue you are
> reporting has already been fixed in JDK 9 [1] and JDK 8udev [2]. This was
> targeted by the fix for bug [3] also backported into 8udev see [4]. The
> corresponding changeset can be found at [5].
>
> Thanks,
> Vicente
>
> [1] http://hg.openjdk.java.net/jdk9/dev/
> [2] http://hg.openjdk.java.net/jdk8u/jdk8u-dev/
> [3] https://bugs.openjdk.java.net/browse/JDK-8047719
> [4] https://bugs.openjdk.java.net/browse/JDK-8048587
> [5] http://hg.openjdk.java.net/jdk9/jdk9/langtools/rev/855f8c7337eb
>
>
> On 10/08/2014 11:03 AM, Liam Miller-Cushon wrote:
>
> It looks like the fix for JDK-8037937 introduced a different LVT-related
> AssertionError. The crash bisects down to
> http://hg.openjdk.java.net/jdk8u/jdk8u/langtools/rev/372fd7283bf0
>
>  Repro:
>
>  === Test.java ===
>  public class Test {
>   void m(Object[] xs) {
>     {
>       Object[] ys;
>       int i;
>
>        for (Object x : xs) {
>       }
>
>        if (xs != null) {
>         i = 0;
>       }
>     }
>   }
> }
>  ===
>
>  $ javac -g Test.java
> An exception has occurred in the compiler (1.8.0_20). Please file a bug at
> the Java Developer Connection (http://java.sun.com/webapps/bugreport)
>  after checking the Bug Parade for duplicates. Include your program and the
> following diagnostic in your report.  Thank you.
> java.lang.AssertionError
>  at com.sun.tools.javac.util.Assert.error(Assert.java:126)
>  at com.sun.tools.javac.util.Assert.check(Assert.java:45)
>  at com.sun.tools.javac.jvm.ClassWriter.writeCode(ClassWriter.java:1189)
>  at com.sun.tools.javac.jvm.ClassWriter.writeMethod(ClassWriter.java:1110)
>  at
> com.sun.tools.javac.jvm.ClassWriter.writeMethods(ClassWriter.java:1602)
>  at
> com.sun.tools.javac.jvm.ClassWriter.writeClassFile(ClassWriter.java:1692)
>  at com.sun.tools.javac.jvm.ClassWriter.writeClass(ClassWriter.java:1620)
>  at com.sun.tools.javac.main.JavaCompiler.genCode(JavaCompiler.java:746)
>  at com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1572)
>  at com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1536)
>  at com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:901)
>  at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:860)
>  at com.sun.tools.javac.main.Main.compile(Main.java:523)
>  at com.sun.tools.javac.main.Main.compile(Main.java:381)
>  at com.sun.tools.javac.main.Main.compile(Main.java:370)
>  at com.sun.tools.javac.main.Main.compile(Main.java:361)
>  at com.sun.tools.javac.Main.compile(Main.java:56)
>  at com.sun.tools.javac.Main.main(Main.java:42)
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20141008/c6cbcd23/attachment.html>


More information about the compiler-dev mailing list