summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorXiangyu Yao <xiangyu.yao@mongodb.com>2018-03-22 14:09:42 -0400
committerXiangyu Yao <xiangyu.yao@mongodb.com>2018-03-23 13:43:26 -0400
commitbfd40e8a7f4d741785a0742e17a1e20027b9f3b4 (patch)
tree9d935f0fedda0dddfd2f3233c7ea1e48ee71b250 /jstests
parent4bb6f1da8c89567c6038b3390e7b034fcbaf18d0 (diff)
downloadmongo-bfd40e8a7f4d741785a0742e17a1e20027b9f3b4.tar.gz
SERVER-33854 Avoid accessing invalid memory in applyOps
Diffstat (limited to 'jstests')
-rw-r--r--jstests/core/apply_ops_without_ns.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/jstests/core/apply_ops_without_ns.js b/jstests/core/apply_ops_without_ns.js
new file mode 100644
index 00000000000..a16c54b8f99
--- /dev/null
+++ b/jstests/core/apply_ops_without_ns.js
@@ -0,0 +1,10 @@
+// @tags: [requires_non_retryable_commands]
+
+(function() {
+ 'use strict';
+
+ // SERVER-33854: This should fail and not cause any invalid memory access.
+ assert.commandFailed(db.adminCommand({
+ applyOps: [{'op': 'c', 'ns': 'admin.$cmd', 'o': {applyOps: [{'op': 'i', 'o': {x: 1}}]}}]
+ }));
+})();