Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-5738

Race condition in ONCE/MONGO_ONCE macros

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • 3.5.2
    • 2.1.1
    • Internal Code
    • None
    • Fully Compatible
    • ALL
    • Platforms 2017-01-23

    Description

      The definition of MONGO_ONCE contains a race condition. It's current implementation is as follows:

      #define MONGO_ONCE for( static bool undone = true; undone; undone = false )

      Plain-and-simple not thread safe.

      Attachments

        Activity

          People

            mark.benvenuto@mongodb.com Mark Benvenuto
            schwerin@mongodb.com Andy Schwerin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: