From 477998eefac3d55831e7f3974671ba22b8739b93 Mon Sep 17 00:00:00 2001 From: dmauro Date: Tue, 29 Sep 2020 15:27:38 -0400 Subject: [PATCH] Googletest export Fix undefined pointer comparison PiperOrigin-RevId: 334436975 --- googletest/src/gtest-death-test.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/googletest/src/gtest-death-test.cc b/googletest/src/gtest-death-test.cc index 0764f2eb..9c54b81f 100644 --- a/googletest/src/gtest-death-test.cc +++ b/googletest/src/gtest-death-test.cc @@ -32,6 +32,7 @@ #include "gtest/gtest-death-test.h" +#include #include #include "gtest/internal/gtest-port.h" @@ -1282,7 +1283,7 @@ GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_ GTEST_ATTRIBUTE_NO_SANITIZE_HWADDRESS_ static void StackLowerThanAddress(const void* ptr, bool* result) { int dummy = 0; - *result = (&dummy < ptr); + *result = std::less()(&dummy, ptr); } // Make sure AddressSanitizer does not tamper with the stack here.