diff options
-rw-r--r-- | etc/evergreen.yml | 2 | ||||
-rw-r--r-- | src/mongo/db/exec/sbe/values/value.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/etc/evergreen.yml b/etc/evergreen.yml index 8b4ed2b1d71..555a59a37c5 100644 --- a/etc/evergreen.yml +++ b/etc/evergreen.yml @@ -7981,7 +7981,7 @@ buildvariants: display_name: "~ Shared Library Enterprise Ubuntu 21.04 GCC11 C++20 DEBUG" expansions: <<: *enterprise-ubuntu2104-dynamic-gcc11-debug-experimental-expansions - compile_flags: --dbg=on --opt=on -j$(grep -c ^processor /proc/cpuinfo) --link-model=dynamic CC=/usr/bin/gcc-11 CXX=/usr/bin/g++-11 --disable-warnings-as-errors --cxx-std=20 + compile_flags: --dbg=on --opt=on -j$(grep -c ^processor /proc/cpuinfo) --link-model=dynamic CC=/usr/bin/gcc-11 CXX=/usr/bin/g++-11 --cxx-std=20 - <<: *enterprise-ubuntu2104-dynamic-gcc11-debug-experimental-template name: enterprise-ubuntu2104-dynamic-clang12-cxx20-debug-experimental diff --git a/src/mongo/db/exec/sbe/values/value.h b/src/mongo/db/exec/sbe/values/value.h index c565be7f644..ebcf4c1a5c0 100644 --- a/src/mongo/db/exec/sbe/values/value.h +++ b/src/mongo/db/exec/sbe/values/value.h @@ -1215,8 +1215,8 @@ inline SortSpec* getSortSpecView(Value val) noexcept { struct BsonRegex { explicit BsonRegex(const char* rawValue) { pattern = rawValue; - // Add sizeof(char) to account for the NULL byte after 'pattern'. - flags = pattern.rawData() + pattern.size() + sizeof(char); + // Add one to account for the NULL byte after 'pattern'. + flags = rawValue + (pattern.size() + 1); } size_t byteSize() const { |