From 21ee8a2e72871ca50148657bc217e9b838dcd903 Mon Sep 17 00:00:00 2001 From: kosak Date: Tue, 17 Jun 2014 23:16:37 +0000 Subject: [PATCH] Disable asan instrumentation for StackGrowsDown(). --- src/gtest-death-test.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gtest-death-test.cc b/src/gtest-death-test.cc index a6023fce..69fe7c1b 100644 --- a/src/gtest-death-test.cc +++ b/src/gtest-death-test.cc @@ -985,6 +985,8 @@ void StackLowerThanAddress(const void* ptr, bool* result) { *result = (&dummy < ptr); } +// Make sure AddressSanitizer does not tamper with the stack here. +GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_ bool StackGrowsDown() { int dummy; bool result;