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

ForkJoinPool.getAndAddPoolIds should use Unsafe.staticFieldBase

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 20
    • None
    • core-libs

      ForkJoinPool.getAndAddPoolIds passes ForkJoinPool.class to Unsafe.getAndAddInt to write a static field of ForkJoinPool. This assumes that static fields are stored in Class objects, which is the case on HotSpot, but according to the documentation on Unsafe.getAndAddInt, the object returned by Unsafe.staticFieldBase should be called.

            alanb Alan Bateman
            phofer Peter Hofer
            Votes:
            0 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: