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

Avoid resetting `ServiceContext` members in `db_unittest_test`

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Won't Do
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Internal Code
    • Labels:
      None
    • Operating System:
      ALL

      Description

      SERVER-51055 aims to ensure setting/getting ServiceContext members (e.g., _fastClockSource) is thread-safe. Resetting a member after reading it, however, violates this guarantee and is not a safe practice. This behavior, even in the context of a single-threaded program, could introduce memory corruptions as an earlier reference to the member (e.g., acquired through getFastClockSource) will be invalidated by resetting the member (e.g., setFastClockSource).

      This ticket should analyze db_unittest_test and fix any set-after-get for ServiceContext members (e.g., here).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              amirsaman.memaripour Amirsaman Memaripour
              Reporter:
              amirsaman.memaripour Amirsaman Memaripour
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: