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

Incorrectly implemented (and unnecessary) double-checked locking in com.sun.tools.javac.code.Types.arraySuperType()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 7, 8
    • tools

      The double-checked locking implemented in com.sun.tools.javac.code.Types.arraySuperType is broken.

      Although it could be fixed (by for instance making arraySuperType volatile) the question is if the synchronization is necessary to begin with:

          A) Other parts of javac isn't thread-safe
          B) Instances of Type shouldn't be compared referentially, so returning different objects for different invocations shouldn't be a problem to begin with.

            Unassigned Unassigned
            alundblad Andreas Lundblad (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: