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

Ensure CompileCtx::root is set before accessing it

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 5.3.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Fully Compatible
    • QE 2021-12-27, QE 2022-01-10, QE 2022-01-24

      Before compiling an sbe::EExpression the caller is responsible for setting the root PlanStage on the CompileCtx. However, this is not enforced in any way. If the caller forgets to set it, this may result in a segfault. At the very least we should have an invariant that the root is set before dereferencing it, for example here.

            Assignee:
            anna.wawrzyniak@mongodb.com Anna Wawrzyniak
            Reporter:
            anton.korshunov@mongodb.com Anton Korshunov
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: