diff options
author | Tad Marshall <tad@10gen.com> | 2012-07-16 14:39:53 -0400 |
---|---|---|
committer | Tad Marshall <tad@10gen.com> | 2012-07-16 14:39:53 -0400 |
commit | c32b1e7c07f79b89641f32d6b68a01ea6f22b23b (patch) | |
tree | 95469eb59c04d43a3e90ee32fcce0fade5889759 /jstests | |
parent | 1abe1c594323cc1ba37b65dac965287353fb8a32 (diff) | |
download | mongo-c32b1e7c07f79b89641f32d6b68a01ea6f22b23b.tar.gz |
Reduce object nesting level from 1500 to 700
On Windows, creating a nested object 1500 levels deep crashes
the shell with a stack overflow. This is presumably because of
the default stack size of 1 MB on Windows; the default stack
size on Linux is 8 MB. So, reduce the nesting level from 1500
to 700 to make the test pass on Windows.
This doesn't address the actual stack overflow problem, which
also exists on Linux but requires a larger number. Testing with
20000 crashes Linux and Mac OS X with segfaults.
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/nestedobj1.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/jstests/nestedobj1.js b/jstests/nestedobj1.js index f54282ddf7c..751eb225524 100644 --- a/jstests/nestedobj1.js +++ b/jstests/nestedobj1.js @@ -16,8 +16,7 @@ t = db.objNestTest; t.drop(); t.ensureIndex({a:1}); -nestedObj = makeNestObj(1500); -print(nestedObj); +nestedObj = makeNestObj(700); t.insert( { tst : "test1", a : nestedObj }, true ); t.insert( { tst : "test2", a : nestedObj }, true ); @@ -28,5 +27,5 @@ assert.eq(1, t.find({tst : "test2"}).count(), "find test"); //make sure index insertion failed (nesting must be large enough) assert.eq(0, t.find().hint({a:1}).explain().n, "index not empty"); - +print("Test succeeded!") } |