-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 6.0.1
-
Component/s: None
-
Fully Compatible
-
ALL
-
according to https://github.com/mongodb/mongo/blob/master/docs/building.md
the error report is:
```bash
Compiling build/59f4f0dd/mongo/db/exec/sbe/values/value_printer.o
In file included from build/59f4f0dd/mongo/base/error_codes.h:36,
from src/mongo/base/data_type.h:37,
from src/mongo/base/data_type_endian.h:35,
from src/mongo/db/exec/sbe/values/value.h:43,
from src/mongo/db/exec/sbe/values/value.cpp:32:
In constructor 'mongo::StringData::StringData(const char*)',
inlined from 'mongo::sbe::value::BsonRegex::BsonRegex(const char*)' at src/mongo/db/exec/sbe/values/value.h:1230:15,
inlined from 'mongo::sbe::value::BsonRegex mongo::sbe::value::getBsonRegexView(mongo::sbe::value::Value)' at src/mongo/db/exec/sbe/values/value.h:1243:44,
inlined from 'std::pair<mongo::sbe::value::TypeTags, long unsigned int> mongo::sbe::value::compareValue(mongo::sbe::value::TypeTags, mongo::sbe::value::Value, mongo::sbe::value::TypeTags, mongo::sbe::value::Value, const mongo::StringData::ComparatorInterface*)' at src/mongo/db/exec/sbe/values/value.cpp:728:41:
src/mongo/base/string_data.h:82:68: error: 'size_t strlen(const char*)' reading 1 or more bytes from a region of size 0 [-Werror=stringop-overread]
82 | ingData(const char* str) : StringData(str, str ? std::strlen(str) : 0) {}
| ~~~~~~~~~~^~~~
In constructor 'mongo::StringData::StringData(const char*)',
inlined from 'mongo::sbe::value::BsonRegex::BsonRegex(const char*)' at src/mongo/db/exec/sbe/values/value.h:1230:15,
inlined from 'mongo::sbe::value::BsonRegex mongo::sbe::value::getBsonRegexView(mongo::sbe::value::Value)' at src/mongo/db/exec/sbe/values/value.h:1243:44,
inlined from 'std::pair<mongo::sbe::value::TypeTags, long unsigned int> mongo::sbe::value::compareValue(mongo::sbe::value::TypeTags, mongo::sbe::value::Value, mongo::sbe::value::TypeTags, mongo::sbe::value::Value, const mongo::StringData::ComparatorInterface*)' at src/mongo/db/exec/sbe/values/value.cpp:727:41:
src/mongo/base/string_data.h:82:68: error: 'size_t strlen(const char*)' reading 1 or more bytes from a region of size 0 [-Werror=stringop-overread]
82 | ingData(const char* str) : StringData(str, str ? std::strlen(str) : 0) {}
| ~~~~~~~~~~^~~~
In constructor 'mongo::StringData::StringData(const char*)',
inlined from 'mongo::sbe::value::BsonRegex::BsonRegex(const char*)' at src/mongo/db/exec/sbe/values/value.h:1230:15,
inlined from 'mongo::sbe::value::BsonRegex mongo::sbe::value::getBsonRegexView(mongo::sbe::value::Value)' at src/mongo/db/exec/sbe/values/value.h:1243:44,
inlined from 'std::pair<mongo::sbe::value::TypeTags, long unsigned int> mongo::sbe::value::compareValue(mongo::sbe::value::TypeTags, mongo::sbe::value::Value, mongo::sbe::value::TypeTags, mongo::sbe::value::Value, const mongo::StringData::ComparatorInterface*)' at src/mongo/db/exec/sbe/values/value.cpp:728:41:
src/mongo/base/string_data.h:82:68: error: 'size_t strlen(const char*)' reading 1 or more bytes from a region of size 0 [-Werror=stringop-overread]
82 | ingData(const char* str) : StringData(str, str ? std::strlen(str) : 0) {}
| ~~~~~~~~~~^~~~
cc1plus: all warnings being treated as errors
scons: *** [build/59f4f0dd/mongo/db/exec/sbe/values/value.o] Error 1
scons: building terminated because of errors.
build/59f4f0dd/mongo/db/exec/sbe/values/value.o failed: Error 1
```