summaryrefslogtreecommitdiff
path: root/jstests/core/recursion.js
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2015-10-13 15:28:45 -0400
committerAndrew Morrow <acm@mongodb.com>2015-10-13 16:44:10 -0400
commit804f8c7b926f999cd1eeaf4ebe50dfb99f7acfad (patch)
tree1236a90fb4867177714a53d413206c0c2d77545e /jstests/core/recursion.js
parent15350b5087dfd09cb2b25a22f422804abc8c2654 (diff)
downloadmongo-804f8c7b926f999cd1eeaf4ebe50dfb99f7acfad.tar.gz
SERVER-19614 Temporarily disable JS recursion depth protections
Diffstat (limited to 'jstests/core/recursion.js')
-rw-r--r--jstests/core/recursion.js81
1 files changed, 43 insertions, 38 deletions
diff --git a/jstests/core/recursion.js b/jstests/core/recursion.js
index dc7b51be845..c35cef4accb 100644
--- a/jstests/core/recursion.js
+++ b/jstests/core/recursion.js
@@ -1,41 +1,46 @@
// Basic tests for a form of stack recursion that's been shown to cause C++
// side stack overflows in the past. See SERVER-19614.
-(function () {
- "use strict";
-
- db.recursion.drop();
-
- // Make sure the shell doesn't blow up
- function shellRecursion() {
- shellRecursion.apply();
- }
- assert.throws(shellRecursion);
-
- // Make sure db.eval doesn't blow up
- function dbEvalRecursion() {
- db.eval(function () {
- function recursion() {
- recursion.apply();
- }
- recursion();
- });
- }
- assert.commandFailedWithCode(assert.throws(dbEvalRecursion), ErrorCodes.JSInterpreterFailure);
-
- // Make sure mapReduce doesn't blow up
- function mapReduceRecursion() {
- db.recursion.mapReduce(function(){
- (function recursion(){
- recursion.apply();
- })();
- }, function(){
- }, {
- out: 'inline'
- });
- }
-
- db.recursion.insert({});
- assert.commandFailedWithCode(
- assert.throws(mapReduceRecursion), ErrorCodes.JSInterpreterFailure);
-}());
+// TODO: Re-enable this test once SERVER-19614 has been resolved in a
+// way that does not conflict with SERVER-20678. See the similar
+// comment in src/mongo/scripting/mozjs/implscope.cpp for additional
+// details.
+//
+// (function () {
+// "use strict";
+//
+// db.recursion.drop();
+//
+// // Make sure the shell doesn't blow up
+// function shellRecursion() {
+// shellRecursion.apply();
+// }
+// assert.throws(shellRecursion);
+//
+// // Make sure db.eval doesn't blow up
+// function dbEvalRecursion() {
+// db.eval(function () {
+// function recursion() {
+// recursion.apply();
+// }
+// recursion();
+// });
+// }
+// assert.commandFailedWithCode(assert.throws(dbEvalRecursion), ErrorCodes.JSInterpreterFailure);
+//
+// // Make sure mapReduce doesn't blow up
+// function mapReduceRecursion() {
+// db.recursion.mapReduce(function(){
+// (function recursion(){
+// recursion.apply();
+// })();
+// }, function(){
+// }, {
+// out: 'inline'
+// });
+// }
+//
+// db.recursion.insert({});
+// assert.commandFailedWithCode(
+// assert.throws(mapReduceRecursion), ErrorCodes.JSInterpreterFailure);
+// }());