diff options
| author | Etienne Bergeron <etienneb@google.com> | 2016-06-29 21:57:58 +0000 |
|---|---|---|
| committer | Etienne Bergeron <etienneb@google.com> | 2016-06-29 21:57:58 +0000 |
| commit | 94500cb532154e7d6e7ad45fcdcbb7cf93c2fdca (patch) | |
| tree | 3b002646e2476aba6fba74b215a1ced28d335a9d | |
| parent | d6d192cd12db3a813e7e70d0ed579093b71277d1 (diff) | |
| download | bcm5719-llvm-94500cb532154e7d6e7ad45fcdcbb7cf93c2fdca.tar.gz bcm5719-llvm-94500cb532154e7d6e7ad45fcdcbb7cf93c2fdca.zip | |
[compiler-rt] Fix Sanitizer-common Unittests on win64
Summary:
This patch is fixing unittests that are broken on windows (64-bits).
Tests under 'SANITIZER_CAN_USE_ALLOCATOR64' are disabled.
A custom allocator for windows based on WinHeap API will replace these tests.
Tested on Win32/Win64 (Ninja and MSVC).
Tested on Linux 32-bit/64-bit clang.
```
C:\src\llvm\build64\projects\compiler-rt>lib\sanitizer_common\tests\Release\Sanitizer-x86_64-Test.exe
[==========] Running 101 tests from 12 test cases.
[----------] Global test environment set-up.
[----------] 51 tests from SanitizerCommon
[ RUN ] SanitizerCommon.DefaultSizeClassMap
[ OK ] SanitizerCommon.DefaultSizeClassMap (1 ms)
[ RUN ] SanitizerCommon.CompactSizeClassMap
[ OK ] SanitizerCommon.CompactSizeClassMap (1 ms)
[ RUN ] SanitizerCommon.InternalSizeClassMap
[ OK ] SanitizerCommon.InternalSizeClassMap (1 ms)
[ RUN ] SanitizerCommon.SizeClassAllocator32Compact
[ OK ] SanitizerCommon.SizeClassAllocator32Compact (828 ms)
[ RUN ] SanitizerCommon.SizeClassAllocator32CompactMetadataStress
[ OK ] SanitizerCommon.SizeClassAllocator32CompactMetadataStress (914 ms)
[ RUN ] SanitizerCommon.SizeClassAllocator32MapUnmapCallback
[...]
[----------] 4 tests from Symbolizer
[ RUN ] Symbolizer.ExtractToken
[ OK ] Symbolizer.ExtractToken (0 ms)
[ RUN ] Symbolizer.ExtractInt
[ OK ] Symbolizer.ExtractInt (0 ms)
[ RUN ] Symbolizer.ExtractUptr
[ OK ] Symbolizer.ExtractUptr (0 ms)
[ RUN ] Symbolizer.ExtractTokenUpToDelimiter
[ OK ] Symbolizer.ExtractTokenUpToDelimiter (0 ms)
[----------] 4 tests from Symbolizer (24 ms total)
[----------] Global test environment tear-down
[==========] 101 tests from 12 test cases ran. (5090 ms total)
[ PASSED ] 101 tests.
```
Reviewers: rnk
Subscribers: chrisha, wang0109, llvm-commits, kubabrecka
Differential Revision: http://reviews.llvm.org/D21817
llvm-svn: 274174
| -rw-r--r-- | compiler-rt/lib/sanitizer_common/tests/sanitizer_printf_test.cc | 6 | ||||
| -rw-r--r-- | compiler-rt/lib/sanitizer_common/tests/sanitizer_test_main.cc | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/compiler-rt/lib/sanitizer_common/tests/sanitizer_printf_test.cc b/compiler-rt/lib/sanitizer_common/tests/sanitizer_printf_test.cc index 5e39e0a591d..5a77b470caf 100644 --- a/compiler-rt/lib/sanitizer_common/tests/sanitizer_printf_test.cc +++ b/compiler-rt/lib/sanitizer_common/tests/sanitizer_printf_test.cc @@ -23,9 +23,9 @@ TEST(Printf, Basic) { 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, (uptr)-2, // NOLINT + (unsigned)-4, (uptr)5, // NOLINT + (unsigned)10, (uptr)11, // NOLINT (void*)0x123, "_string_"); EXPECT_EQ(len, strlen(buf)); diff --git a/compiler-rt/lib/sanitizer_common/tests/sanitizer_test_main.cc b/compiler-rt/lib/sanitizer_common/tests/sanitizer_test_main.cc index 20f8f53975d..55888d487e3 100644 --- a/compiler-rt/lib/sanitizer_common/tests/sanitizer_test_main.cc +++ b/compiler-rt/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) { |

