Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8209055

c.s.t.javac.code.DeferredCompletionFailureHandler seems to use WeakHashMap incorrectly

    Details

    • Subcomponent:
    • Resolved In Build:
      b20

      Backports

        Description

        I've observed OOM from javac, where a half of the heap was held by com.sun.tools.javac.code.DeferredCompletionFailureHandler instances.

        DeferredCompletionFailureHandler$Handler has WeakHashMap<ClassSymbol, FlipSymbolDescription> class2Flip field, where FlipSymbolDescription has a strong reference to ClassSymbol, which is always the same as a key. j.u.WHM guarantees that keys are weakly referenced, but doesn't give any guarantees on how values are referenced, in fact, there is an implementation note which states that values are held by strong references.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jlahoda Jan Lahoda
                  Reporter:
                  iignatyev Igor Ignatyev
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: