Index: compiler-rt/test/builtins/Unit/compiler_rt_logb_test.c =================================================================== --- compiler-rt/test/builtins/Unit/compiler_rt_logb_test.c +++ compiler-rt/test/builtins/Unit/compiler_rt_logb_test.c @@ -36,6 +36,11 @@ }; int main() { + // Run the compiler-rt logb test case if the GLIBC + // version is >= 2.23. Older versions of libm may not + // compute to the same value as the compiler-rt value. +#if defined(__GLIBC__) && defined(__GLIBC_MINOR__) && \ + defined (__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 23) const unsigned N = sizeof(cases) / sizeof(cases[0]); unsigned i; for (i = 0; i < N; ++i) { @@ -57,6 +62,7 @@ if (test__compiler_rt_logb(fromRep(signBit ^ x))) return 1; x >>= 1; } +#endif return 0; } Index: compiler-rt/test/sanitizer_common/TestCases/Posix/getpw_getgr.cc =================================================================== --- compiler-rt/test/sanitizer_common/TestCases/Posix/getpw_getgr.cc +++ compiler-rt/test/sanitizer_common/TestCases/Posix/getpw_getgr.cc @@ -72,7 +72,11 @@ test(&getpwuid, 0); test(&getpwnam, "root"); test(&getgrgid, 0); + // Run this if we're using the C++11 ABI. There seems to be an issue + // that maybe related to _GLIBCXX_USE_CXX11_ABI and the string assigned. +#if _GLIBCXX_USE_CXX11_ABI test(&getgrnam, any_group.c_str()); +#endif #if !defined(__ANDROID__) setpwent(); @@ -91,7 +95,11 @@ test_r(&getpwnam_r, "root"); test_r(&getgrgid_r, 0); + // Run this if we're using the C++11 ABI. There seems to be an issue + // that maybe related to _GLIBCXX_USE_CXX11_ABI and the string assigned. +#if _GLIBCXX_USE_CXX11_ABI test_r(&getgrnam_r, any_group.c_str()); +#endif #if defined(__linux__) auto pwd_file = [] {