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

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

              Created:
              Updated:
              Resolved: