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

Coverity analysis defect 172710: Dereference after null check

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Query Execution
    • Fully Compatible
    • ALL
    • QE 2025-03-31, QE 2025-04-14
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Dereference after null check

      Either the check against null is unnecessary, or there may be a null pointer dereference. Pointer is checked against null but then dereferenced anyway
      /data/bazel_cache/1de52aaeb35278243ca29a4785ce7969/execroot/_main/src/mongo/db/exec/sbe/stages/hash_agg.h:138: FORWARD_NULL 172710 Calling "this->_recordStore.operator bool()" implies that "this->_recordStore" might be null-like.
      /data/bazel_cache/1de52aaeb35278243ca29a4785ce7969/execroot/_main/src/mongo/db/exec/sbe/stages/hash_agg.h:150: FORWARD_NULL 172710 Although "spill" does overwrite "this->_recordStore" on some paths, it also contains at least one feasible path which does not overwrite it.

            Assignee:
            foteini.alvanaki@mongodb.com Foteini Alvanaki
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              None
              None
              None
              None