AssertionError during LVT generation with javac 8u20

Vicente-Arturo Romero-Zaldivar vicente.romero at oracle.com
Thu Oct 9 17:18:51 UTC 2014


On 10/08/2014 08:25 PM, Liam Miller-Cushon wrote:
> Thanks for the background. Leaving assertions and failing fast sounds 
> good to me. I'll be sure to pass along any more issues we see (after 
> confirming you haven't fixed them already, of course.)

Thanks in advance!
Vicente

>
> Liam
>
> On Wed, Oct 8, 2014 at 6:14 PM, Vicente-Arturo Romero-Zaldivar 
> <vicente.romero at oracle.com <mailto:vicente.romero at oracle.com>> wrote:
>
>     Hi Liam,
>
>     On 10/08/2014 05:55 PM, Liam Miller-Cushon wrote:
>>     Thanks Vicente, I meant to test against JDK 9 but clearly did
>>     not. Sorry for the duplicate.
>
>     np
>
>>
>>     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
>
>     Some background on LVT generation bugs:
>
>     Actually there have been some LVT generation bugs lately. Most of
>     them corner cases that may appear in large projects, at least this
>     is my feeling. We have tried to detect, and create regression
>     tests, for most of these special cases. We have left assertions
>     for those that may leak, even when this might provoke a crash but
>     anyway a wrong LVT will provoke a crash sooner or later. So we
>     really appreciate LVT generation bug reports, as in other areas of
>     course.
>
>     Thanks,
>     Vicente
>
>
>>
>>     On Wed, Oct 8, 2014 at 2:01 PM, Vicente-Arturo Romero-Zaldivar
>>     <vicente.romero at oracle.com <mailto: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/20141009/82181749/attachment-0001.html>


More information about the compiler-dev mailing list