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

Avoid resetting `ServiceContext` members in `CursorManagerTest`

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Internal Code
    • None
    • 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 CursorManagerTest and fix any set-after-get for ServiceContext members (e.g., here).

      Attachments

        Activity

          People

            amirsaman.memaripour@mongodb.com Amirsaman Memaripour
            amirsaman.memaripour@mongodb.com Amirsaman Memaripour
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: