Infloop in javac on invalid source

Martin Buchholz martinrb at
Fri May 10 16:51:44 PDT 2013

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:

set -eu

mkdir -p /tmp/t9/baz
cd /tmp/t9

cat > <<'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() { }

cat > baz/ <<'EOF'
package baz;
import java.util.Map;
public class Baz <M extends Map> {
   void run() { }

javac baz/
jar cvf libbaz.jar baz/Baz.class
javac -cp libbaz.jar
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the compiler-dev mailing list