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

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P5
    • 5.0
    • Affects Version/s: 2.0
    • Component/s: 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.

            Assignee:
            Coleen Phillimore
            Reporter:
            Peter Kessler
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: