Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-1480

Race in mongoc_log_set_handler

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.5.0
    • Affects Version/s: None
    • Component/s: libmongoc
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      mongoc_log and mongoc_log_set_handler use two different pthread_once_t's to ensure one-time initialization, but they share mutable state. Multiple threads calling a mix of the two functions will race to initialize the global logging mutex, possibly initializing it more than once.

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: