forked from OSchip/llvm-project
[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
This commit is contained in:
parent
d6d192cd12
commit
94500cb532
|
@ -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));
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue