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

Coverity analysis defect 172723: Pointer to local outside scope

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Catalog and Routing
    • ALL
    • CAR Team 2025-04-28
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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
      /data/bazel_cache/1de52aaeb35278243ca29a4785ce7969/execroot/_main/src/mongo/db/s/shardsvr_participant_block_command.cpp:115: RETURN_LOCAL 172723 Assigning: "beforeReleasingAction" = "(mongo::NamespaceString(this->this->mongo::<unnamed>::ShardSvrParticipantBlockCommand::Invocation::ns()).isDbOnly() && !this->this->request()->getClearDbInfo()) ? static_cast<mongo::ShardingRecoveryService::BeforeReleasingCustomAction const &>(mongo::ShardingRecoveryService::NoCustomAction()) : static_cast<mongo::ShardingRecoveryService::BeforeReleasingCustomAction const &>(mongo::ShardingRecoveryService::FilteringMetadataClearer(false))".
      /data/bazel_cache/1de52aaeb35278243ca29a4785ce7969/execroot/_main/src/mongo/db/s/shardsvr_participant_block_command.cpp:115: RETURN_LOCAL 172723 Temporary variable of type "mongo::ShardingRecoveryService::FilteringMetadataClearer" goes out of scope.
      /data/bazel_cache/1de52aaeb35278243ca29a4785ce7969/execroot/_main/src/mongo/db/s/shardsvr_participant_block_command.cpp:124: RETURN_LOCAL 172723 Using "beforeReleasingAction", which points to an out-of-scope temporary variable of type "mongo::ShardingRecoveryService::FilteringMetadataClearer".

            Assignee:
            pol.pinol@mongodb.com Pol Pinol
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              None
              None
              None
              None