Infloop in javac on invalid source

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P3
    • 8
    • Affects Version/s: 8
    • Component/s: tools
    • None

      From Martin Bucholz at google,
      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

            Assignee:
            Maurizio Cimadamore
            Reporter:
            Jonathan Gibbons
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: