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

Coverity analysis defect 121548: Pointer to local outside scope

    • Type: Icon: Bug Bug
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • ALL
    • QO 2022-03-07

      Pointer to local outside scope

      Dereferencing the returned or out-of-scope stack pointer will access an invalid location on the stack after its scope or after the function returns. Pointer to a local stack variable returned or used outside scope
      /src/mongo/db/query/planner_analysis.cpp:634: RETURN_LOCAL 121548 Assigning: "prefixedIndex" = "&idxEntry" (address of local variable "idxEntry").
      /src/mongo/db/query/planner_analysis.cpp:635: RETURN_LOCAL 121548 Variable "idxEntry" goes out of scope.
      /src/mongo/db/query/planner_analysis.cpp:643: RETURN_LOCAL 121548 Using "prefixedIndex", which points to an out-of-scope variable "idxEntry".

            Assignee:
            nikita.lapkov@mongodb.com Nikita Lapkov (Inactive)
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: