Commit 477998ee authored by dmauro's avatar dmauro Committed by Andy Getz
Browse files

Googletest export

Fix undefined pointer comparison

PiperOrigin-RevId: 334436975
parent 2ff8d94d
......@@ -32,6 +32,7 @@
#include "gtest/gtest-death-test.h"
#include <functional>
#include <utility>
#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<const void*>()(&dummy, ptr);
}
// Make sure AddressSanitizer does not tamper with the stack here.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment