summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitaly Buka <vitalybuka@google.com>2021-11-12 17:41:50 -0800
committerTom Stellard <tstellar@redhat.com>2021-12-20 21:50:02 -0800
commit2c6c3e4b713b05f249d75c3345785b6dad11c970 (patch)
tree3fb3f51e099579c41fbdc050e9d81a471a2efef6
parentc1b51f098751b384040c3f4c5a4608f208d5e3f5 (diff)
downloadllvm-2c6c3e4b713b05f249d75c3345785b6dad11c970.tar.gz
[asan] Fix "no matching function" on GCC
(cherry picked from commit 4b768eeb976ec15a2701f9a7b3eac2b0b43e8a7d)
-rw-r--r--compiler-rt/test/asan/TestCases/Posix/unpoison-alternate-stack.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler-rt/test/asan/TestCases/Posix/unpoison-alternate-stack.cpp b/compiler-rt/test/asan/TestCases/Posix/unpoison-alternate-stack.cpp
index a2082ed08215..101c35fa10be 100644
--- a/compiler-rt/test/asan/TestCases/Posix/unpoison-alternate-stack.cpp
+++ b/compiler-rt/test/asan/TestCases/Posix/unpoison-alternate-stack.cpp
@@ -139,7 +139,7 @@ void *threadFun(void *AltStack) {
int main() {
size_t const PageSize = sysconf(_SC_PAGESIZE);
// The Solaris defaults of 4k (32-bit) and 8k (64-bit) are too small.
- size_t const MinStackSize = std::max(PTHREAD_STACK_MIN, 16 * 1024);
+ size_t const MinStackSize = std::max<size_t>(PTHREAD_STACK_MIN, 16 * 1024);
// To align the alternate stack, we round this up to page_size.
size_t const DefaultStackSize =
(MinStackSize - 1 + PageSize) & ~(PageSize - 1);