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-09-29 21:20:23 +0000
commit46ba1b4ec34ddb0bdecaa8261f770bbf1c860216 (patch)
tree1992753f2aca2dd94a8c0c4dfaafe1fbfd3ac92e /jstests
parent2361822068027ab179bf0bbab15c5559612130a6 (diff)
downloadmongo-46ba1b4ec34ddb0bdecaa8261f770bbf1c860216.tar.gz
SERVER-60299 Backport PCRE bugfix for Bugzilla #2613
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 4b0fd4c4cb4..072b006b241 100644
--- a/jstests/core/regex_error.js
+++ b/jstests/core/regex_error.js
@@ -14,4 +14,15 @@ assert.commandFailedWithCode(coll.runCommand("find", {filter: {a: {$regex: "ab\0
ErrorCodes.BadValue);
assert.commandFailedWithCode(
coll.runCommand("find", {filter: {a: {$regex: "ab", $options: "\0i"}}}), 51108);
+
+// 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>!)||(?<a>)|(?<a>||(?<a><a>W!| P(?<a>!) C(?<a>!)||(?<a>!aR(?<a>!aR)|(?<a>!?!);|(?<a>W(?<a>!) C(?<a>!)||(?<a>!aR)|(?<a>|1|t(?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