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

Use after move in plan_cache_commands.cpp

    • Fully Compatible
    • ALL

      'nss' in the following code is moved in a QueryRequest object and then referenced again when creating an ExtensionsCallbackReal instance. 

      https://github.com/mongodb/mongo/blob/4b880132b11c16a4a0cba4e5c3ce77892dd01f7c/src/mongo/db/commands/plan_cache_commands.cpp#L88-L94

      This has the potential to cause problems, as ExtensionsCallbackReal uses this namespace in construction of a TextMatchExpression, which then obtains db and collection locks on the namespace.

            Assignee:
            charlie.swanson@mongodb.com Charlie Swanson
            Reporter:
            james.wahlin@mongodb.com James Wahlin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: