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

bson getOwned() unproper used

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Gone away
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Sharding
    • None
    • ALL

    Description

      https://github.com/mongodb/mongo/blob/53adeef7dbf5170a94f3e6d25425e8524fb9d062/src/mongo/db/s/collection_metadata.cpp#L104

      getOwned() here does nothing to the object being called.
      It only returns a new copy.
      it is unproper used, and may lead to bad memory reference.
      Perhaps metadata->_keyPattern = this->_keyPattern.getOwned() is what you need.

      Attachments

        Activity

          People

            ramon.fernandez@mongodb.com Ramon Fernandez Marina
            wolf_kdy deyukong
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: