Details
-
Bug
-
Status: Closed
-
Critical - P2
-
Resolution: Fixed
-
3.4.8
-
Fully Compatible
-
ALL
-
v3.4, v3.2
-
Platforms 2017-09-11
Description
"scope" allows a user to provide a map of global variables to expose to all JS functions ran during a mapReduce job. However, we do not take an owned copy of the map from the command. If scope contains an object, this triggers the memory protection mechanisms added in SERVER-30875.
MongoDB Enterprise > db.runCommand({mapReduce: "foo", map: function(x) {return emit("hello", 1);}, reduce: function(x) { return 0; }, scope: {x: {x: function() {return 5;}}}, out: "bar"})
|
{
|
"ok" : 0,
|
"errmsg" : "Attempt to bind an unowned BSON Object to a JS scope marked as requiring ownership",
|
"code" : 2,
|
"codeName" : "BadValue"
|
}
|
Attachments
Issue Links
- is related to
-
SERVER-30875 Add support for a "no-owned bson" mode for JS Scopes
-
- Closed
-