diff options
author | Billy Donahue <billy.donahue@mongodb.com> | 2020-05-13 23:41:50 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-05-19 21:47:49 +0000 |
commit | e25d6c9c19e1897497ef07fcbb656bd4c17be349 (patch) | |
tree | 8fcba3f72d1c7d2d2229fc95311a628efba3ecb0 | |
parent | 820cc0f7b703ea0949c7a3c508d6708eed3d3afb (diff) | |
download | mongo-e25d6c9c19e1897497ef07fcbb656bd4c17be349.tar.gz |
SERVER-48116 fix init-order bug in pcrecpp::RE::Init
-rw-r--r-- | src/third_party/pcre-8.42/patches/0002-SERVER-48116-fix-init-order-bug-in-pcrecpp-RE-Init.patch | 17 | ||||
-rw-r--r-- | src/third_party/pcre-8.42/pcrecpp.cc | 3 |
2 files changed, 10 insertions, 10 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 index 66aab751b79..8ce0cb86b28 100644 --- 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 @@ -1,14 +1,14 @@ -From 62877f15fcaf81eed85da5a7f11363d103a0b940 Mon Sep 17 00:00:00 2001 +From 96a332047b292078185d57ab2fd671f2a374f7d4 Mon Sep 17 00:00:00 2001 From: Billy Donahue <billy.donahue@mongodb.com> -Date: Mon, 11 May 2020 18:33:32 -0400 +Date: Thu, 14 May 2020 00:11:12 -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(-) + src/third_party/pcre-8.42/pcrecpp.cc | 5 +---- + 1 file changed, 1 insertion(+), 4 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 +index 1147d01108..0b0cb8555f 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 @@ -21,14 +21,15 @@ index 1147d01108..f37e3ed7c4 100644 // 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[] = { +@@ -102,7 +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; +- options_ = default_options; ++ options_ = RE_Options(); } else { options_ = *options; + } -- 2.17.1 diff --git a/src/third_party/pcre-8.42/pcrecpp.cc b/src/third_party/pcre-8.42/pcrecpp.cc index f37e3ed7c44..0b0cb8555f4 100644 --- a/src/third_party/pcre-8.42/pcrecpp.cc +++ b/src/third_party/pcre-8.42/pcrecpp.cc @@ -99,8 +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; + options_ = RE_Options(); } else { options_ = *options; } |