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

Potential race in trace_locking(Mutex*, char*, char*)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P5 P5
    • 5.0
    • 2.0
    • hotspot
    • b17
    • generic
    • generic

      It looks like there's a potential race in

          void trace_locking(Mutex* mutex, char *type, char *state) {

      where if more than one thread calls it when TraceLocking_lock is
      NULL, they will all try to allocate a Mutex and assign it to
      TraceLocking_lock. That's race #1. Then whether any given
      thread uses the same value for TraceLocking_lock->lock() and
      TraceLocking_lock->unlock() is questionable, too.

            coleenp Coleen Phillimore
            pbk Peter Kessler
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: