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

JS Object builtin prototype is not thread safe

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2
    • 8
    • 8
    • core-libs
    • b96
    • generic
    • generic
    • Verified

    Description

      I have been chasing a failure that occurs very very rarely (twice since I started to work on npm few weeks ago).

      Concurrent call to Object.create in parallel with object instantiation makes the PropertyListenerManager of the builtin Object prototype to :
      1) handle removeNotificationListener when Object.create is called
      2) handle addNotificationListener for object literal.

      This is causing java.util.ConcurrentModificationException

      The list of listeners should be synchronized.

      Attachments

        1. fix.patch
          1.0 kB
        2. thread.js
          0.5 kB

        Activity

          People

            hannesw Hannes Wallnoefer
            jfdenise Jean-Francois Denise (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: