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

Details

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

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: