use-after-delete of logv2 getTenantID callback singleton

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 5.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • Security 2021-09-20
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Came up in cxx-discuss slack conversation. Here's the log:

      If your code is running during static-duration shutdown (i.e. after main), it looks like there is a potential use-after-delete bug in introduced in SERVER-59463. https://github.com/mongodb/mongo/blame/fa7f62a123/src/mongo/logv2/log_detail.cpp#L50 That local static would be dead at some point after main exits, but while user code could still depend on it for logging.
      (A StaticImmortal would fix it)

            Assignee:
            Sara Golemon (Inactive)
            Reporter:
            Billy Donahue
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: