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

nullptr dereference in CollectionImpl::initFromExisting

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 6.3.0-rc0
    • None
    • None
    • None
    • Storage Execution
    • Fully Compatible
    • ALL
    • Execution Team 2022-12-26

    Description

      We use collection here without checking if it's nullptr. But in CollectionCatalog::_createNewPITCollection we call initFromExisting with nullptr. This causes a segmentation fault.

      At the very least we should avoid dereferencing collection if it's nullptr.

      But I think we probably actually shouldn't be calling a function initFromExisting with something that's not existing. I was actually confused the first time I came across the call site because of that. So we could also instead have an `CollectionImpl::init` function that takes a read timestamp, and use that.

      Attachments

        Activity

          People

            gregory.wlodarek@mongodb.com Gregory Wlodarek
            matthew.saltz@mongodb.com Matthew Saltz (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: