Add GoogleTest workaround for MSVC crash with Address Sanitizer (ASAN) on version 17.3.3

PiperOrigin-RevId: 477240422
Change-Id: I894037850617252e462783c0885e30fc8e7ad122
This commit is contained in:
Abseil Team 2022-09-27 12:08:58 -07:00 committed by Copybara-Service
parent 63907e1bfe
commit dfa6735236

View File

@ -2713,7 +2713,8 @@ TestInfo::TestInfo(const std::string& a_test_suite_name,
internal::TypeId fixture_class_id,
internal::TestFactoryBase* factory)
: test_suite_name_(a_test_suite_name),
name_(a_name),
// begin()/end() is MSVC 17.3.3 ASAN crash workaround (GitHub issue #3997)
name_(a_name.begin(), a_name.end()),
type_param_(a_type_param ? new std::string(a_type_param) : nullptr),
value_param_(a_value_param ? new std::string(a_value_param) : nullptr),
location_(a_code_location),