summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorRyan Egesdahl <ryan.egesdahl@mongodb.com>2021-09-29 20:55:40 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-10-04 17:28:33 +0000
commit49f1a187b3acee15461c4863af4c440509d5f89c (patch)
tree55ef80ce82aac5b108ae696b01e3390251d24e0f /jstests
parentd9dba1a12f4e1257b711c5e7859de7d7680d5bc6 (diff)
downloadmongo-49f1a187b3acee15461c4863af4c440509d5f89c.tar.gz
SERVER-60299 Backport PCRE bugfix for Bugzilla #2613
(cherry picked from commit 46ba1b4ec34ddb0bdecaa8261f770bbf1c860216) (cherry picked from commit dbb78400a8ebdc3f376722ac15f1f882fa1326c5) (cherry picked from commit 9fdb2031fba405e77368e5780722db7681c4a47f)
Diffstat (limited to 'jstests')
-rw-r--r--jstests/core/regex_error.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/jstests/core/regex_error.js b/jstests/core/regex_error.js
index 19e191d754c..fa587de6c56 100644
--- a/jstests/core/regex_error.js
+++ b/jstests/core/regex_error.js
@@ -11,4 +11,15 @@ assert.commandFailedWithCode(coll.runCommand("find", {filter: {a: {$regex: "ab\0
ErrorCodes.BadValue);
assert.commandFailedWithCode(
coll.runCommand("find", {filter: {a: {$regex: "ab", $options: "\0i"}}}), ErrorCodes.BadValue);
+
+// SERVER-58705: Should fail without a memory leak
+assert.commandFailedWithCode(coll.runCommand("find", {
+ filter: {
+ a: {
+ $regex:
+ "(?JJJ)>?W((?<a>!)||(?<a><aR)|(?<a>W!| P(?<a>!) C(?<a>!)||(?<a>!)|;|(?<a>W!| P(?<a>!) C(?<a>!)||(?<a>!aR(?<a>!aR)|(?<a>!?!)|(?<a>W!| P(?<e>!) C(?<a>!)||(?<a>!aR)|(?<a>!?!)||(?<a>)|(?<a>!6]|P(?<a>!)|(?<aa>!?!);|(?<a>W!| P(?<a>!) C(?<a>!)||(?<a>!aR|(?<a>!?!);|(?<a>W!) (?<a>!)||(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