[PATCH] D21817: [compiler-rt] Fix Sanitizer-common Unittests on win64
Etienne Bergeron via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 29 08:29:06 PDT 2016
etienneb updated this revision to Diff 62224.
etienneb added a comment.
increase stack
http://reviews.llvm.org/D21817
Files:
lib/sanitizer_common/sanitizer_platform.h
lib/sanitizer_common/tests/sanitizer_printf_test.cc
lib/sanitizer_common/tests/sanitizer_test_main.cc
Index: lib/sanitizer_common/tests/sanitizer_test_main.cc
===================================================================
--- lib/sanitizer_common/tests/sanitizer_test_main.cc
+++ lib/sanitizer_common/tests/sanitizer_test_main.cc
@@ -13,6 +13,10 @@
#include "gtest/gtest.h"
#include "sanitizer_common/sanitizer_flags.h"
+#ifdef _MSC_VER
+#pragma comment(linker, "/STACK:33554432")
+#endif
+
const char *argv0;
int main(int argc, char **argv) {
Index: lib/sanitizer_common/tests/sanitizer_printf_test.cc
===================================================================
--- lib/sanitizer_common/tests/sanitizer_printf_test.cc
+++ lib/sanitizer_common/tests/sanitizer_printf_test.cc
@@ -23,9 +23,9 @@
char buf[1024];
uptr len = internal_snprintf(buf, sizeof(buf),
"a%db%zdc%ue%zuf%xh%zxq%pe%sr",
- (int)-1, (long)-2, // NOLINT
- (unsigned)-4, (unsigned long)5, // NOLINT
- (unsigned)10, (unsigned long)11, // NOLINT
+ (int)-1, (sptr)-2, // NOLINT
+ (unsigned)-4, (sptr)5, // NOLINT
+ (unsigned)10, (sptr)11, // NOLINT
(void*)0x123, "_string_");
EXPECT_EQ(len, strlen(buf));
Index: lib/sanitizer_common/sanitizer_platform.h
===================================================================
--- lib/sanitizer_common/sanitizer_platform.h
+++ lib/sanitizer_common/sanitizer_platform.h
@@ -168,7 +168,7 @@
// For such platforms build this code with -DSANITIZER_CAN_USE_ALLOCATOR64=0 or
// change the definition of SANITIZER_CAN_USE_ALLOCATOR64 here.
#ifndef SANITIZER_CAN_USE_ALLOCATOR64
-# if defined(__mips64) || defined(__aarch64__)
+# if defined(__mips64) || defined(__aarch64__) || defined(_WIN32)
# define SANITIZER_CAN_USE_ALLOCATOR64 0
# else
# define SANITIZER_CAN_USE_ALLOCATOR64 (SANITIZER_WORDSIZE == 64)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21817.62224.patch
Type: text/x-patch
Size: 1788 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160629/3ed7f26d/attachment.bin>
More information about the llvm-commits
mailing list