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

PrepareExecutionHelper should not store unowned pointer to CanonicalQuery

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • ALL
    • v8.0
    • QE 2024-02-19, QE 2024-03-04, QE 2024-03-18, QE 2024-04-01, QE 2024-04-15, QE 2024-04-29, QE 2024-05-13, QE 2024-05-27, QE 2024-06-10, QE 2024-06-24, QE 2024-07-08, QE 2024-07-22, QE 2024-08-05, QE 2024-08-19, QE 2024-09-02, QE 2024-09-16, QE 2024-09-30

      A query-fatal error can result in the CanonicalQuery getting freed before the PrepareExecutionHelper, resulting in PrepareExecutionHelper holding a dangling pointer. We could ensure that we only dereference the pointer when we know for sure it's live, but there's always a risk that subtle changes to the code will add unsafe accesses.

            Assignee:
            justin.seyster@mongodb.com Justin Seyster
            Reporter:
            justin.seyster@mongodb.com Justin Seyster
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: