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

Constant folder for MultiLet accesses "not found" iterator

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • Fully Compatible
    • ALL
    • 200
    • None
    • 0
    • None
    • None
    • None
    • None
    • None
    • None

      In the following query

      [{
              "$project": {
                  "measurement1": {
                      "$multiply": [{
                          "$cmp": [{"$rtrim": {"input": {"$toUpper": "$obj.obj.obj.str"}}}, {"$max": []}]
                      }]
                  }
              }
          }]
      

      when processing the MultiLet in the constant folder for the third time, we look for an entry in the hash map that doesn't exist but we dereference it without checking.
      In debug mode it prints

      [external/abseil-cpp~/absl/container/internal/raw_hash_set.h : 1144] RAW: operator-> called on end() iterator.
      

      then it crashes with an access violation

            Assignee:
            projjal.chanda@mongodb.com Projjal Chanda
            Reporter:
            alberto.massari@mongodb.com Alberto Massari
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: