diff options
Diffstat (limited to 'src/third_party/pcre-8.42/patches/0002-SERVER-48116-fix-init-order-bug-in-pcrecpp-RE-Init.patch')
-rw-r--r-- | src/third_party/pcre-8.42/patches/0002-SERVER-48116-fix-init-order-bug-in-pcrecpp-RE-Init.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/third_party/pcre-8.42/patches/0002-SERVER-48116-fix-init-order-bug-in-pcrecpp-RE-Init.patch b/src/third_party/pcre-8.42/patches/0002-SERVER-48116-fix-init-order-bug-in-pcrecpp-RE-Init.patch new file mode 100644 index 00000000000..66aab751b79 --- /dev/null +++ b/src/third_party/pcre-8.42/patches/0002-SERVER-48116-fix-init-order-bug-in-pcrecpp-RE-Init.patch @@ -0,0 +1,34 @@ +From 62877f15fcaf81eed85da5a7f11363d103a0b940 Mon Sep 17 00:00:00 2001 +From: Billy Donahue <billy.donahue@mongodb.com> +Date: Mon, 11 May 2020 18:33:32 -0400 +Subject: [PATCH] SERVER-48116 fix init-order bug in pcrecpp::RE::Init + +--- + src/third_party/pcre-8.42/pcrecpp.cc | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/src/third_party/pcre-8.42/pcrecpp.cc b/src/third_party/pcre-8.42/pcrecpp.cc +index 1147d01108..f37e3ed7c4 100644 +--- a/src/third_party/pcre-8.42/pcrecpp.cc ++++ b/src/third_party/pcre-8.42/pcrecpp.cc +@@ -77,9 +77,6 @@ extern Arg no_arg + // If a regular expression has no error, its error_ field points here + static const string empty_string; + +-// If the user doesn't ask for any options, we just use this one +-static RE_Options default_options; +- + // Specials for the start of patterns. See comments where start_options is used + // below. (PH June 2018) + static const char *start_options[] = { +@@ -102,6 +99,7 @@ static const char *start_options[] = { + void RE::Init(const string& pat, const RE_Options* options) { + pattern_ = pat; + if (options == NULL) { ++ static const RE_Options& default_options = *new RE_Options(); + options_ = default_options; + } else { + options_ = *options; +-- +2.17.1 + |