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

Group command needs to make a copy of the obj it passes to JS

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.2.17, 3.3.4
    • Affects Version/s: 3.2.4
    • Component/s: JavaScript
    • Fully Compatible
    • ALL
    • v3.2
    • Platforms 12 (04/01/16)
    • 0

      GroupStage::processObject needs to make a copy of obj before passing it down into js, because those objects can be copied into the accumulating object (after which that object won't be readable).

      It doesn't appear that this is a crasher (because we use the scope's generation to trap the invalid access), but it does mean that valid operations will fail with uasserts later on.

      We should make obj an owned copy and add a test for the functionality

            jonathan.reams@mongodb.com Jonathan Reams
            mira.carey@mongodb.com Mira Carey
            0 Vote for this issue
            6 Start watching this issue