Coverity analysis defect 175022: Dereference of potentially null field

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Do
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Server Programmability
    • ALL
    • Programmability 2025-09-01
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Dereference of potentially null field

      If the field is actually null, then a null pointer dereference will occur. Field, which is statistically checked against null, is dereferenced.
      /src/mongo/util/stacktrace_threads.cpp:301: NULL_FIELD 175022 Reading field "_head", which is expected to possibly be "nullptr" in "this->_head" (checked 1 out of 1 times).
      /src/mongo/util/stacktrace_threads.cpp:301: NULL_FIELD 175022 Assigning: "node" = "std::exchange(this->_head, node->intrusiveNext)".
      /src/mongo/util/stacktrace_threads.cpp:302: NULL_FIELD 175022 Dereferencing "node", which is known to be "nullptr".

            Assignee:
            Alex Li
            Reporter:
            Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: