Infloop in javac on invalid source
Jonathan Gibbons
jonathan.gibbons at oracle.com
Sat May 11 10:15:48 PDT 2013
Martin,
Thank you. I have filed JDK-8014380 to track this issue.
-- Jon
On 05/10/2013 04:51 PM, Martin Buchholz wrote:
> Hi javac folk!
>
> This is a bug report for a serious bug: an infinite loop in javac that
> appears to have been introduced into jdk7 (also repro'd in dk8)
> relatively recently, as discovered by my colleague Raluca. She
> suspects this commit:
>
> http://hg.openjdk.java.net/jdk7u/jdk7u/langtools/rev/4baab658f357
>
> #!/bin/bash
> set -eu
>
> mkdir -p /tmp/t9/baz
> cd /tmp/t9
>
> cat > A.java <<'EOF'
> import java.util.Map;
> import java.util.Set;
> import baz.Baz;
> public class A {
> private static class Foo<M extends Map, S extends Set> extends
> Bar<M, S> {
> @Override void run() {}
> }
> private static class Bar<M extends Map, S extends Set> extends
> Baz<M, S> {
> @Override void run() { }
> }
> }
> EOF
>
> cat > baz/Baz.java <<'EOF'
> package baz;
> import java.util.Map;
> public class Baz <M extends Map> {
> void run() { }
> }
> EOF
>
> javac baz/Baz.java
> jar cvf libbaz.jar baz/Baz.class
> javac -cp libbaz.jar A.java
>
More information about the jdk7-dev
mailing list