[release_34] [compiler-rt] Multiple test failures on i586

  1. Memory sanitizer not supported on i386-linux?

FAIL: MemorySanitizer :: allocator_returns_null.cc (16403 of 16692)
******************** TEST ‘MemorySanitizer :: allocator_returns_null.cc’ FAILED ********************
Script:

tsan and msan are not supported on 32-bit arch.

1. Memory sanitizer not supported on i386-linux?

FAIL: MemorySanitizer :: allocator_returns_null.cc (16403 of 16692)
******************** TEST 'MemorySanitizer :: allocator_returns_null.cc'
FAILED ********************
Script:
--
/home/abuild/rpmbuild/BUILD/llvm/stage2/bin/clang --driver-mode=g++
-fsanitize=memory -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer
-fno-optimize-sibling-calls -g -O0
/home/abuild/rpmbuild/BUILD/llvm/projects/compiler-rt/lib/msan/lit_tests/allocator_returns_null.cc
-o
/home/abuild/rpmbuild/BUILD/llvm/stage2/projects/compiler-rt/lib/msan/lit_tests/Output/allocator_returns_null.cc.tmp
not
/home/abuild/rpmbuild/BUILD/llvm/stage2/projects/compiler-rt/lib/msan/lit_tests/Output/allocator_returns_null.cc.tmp
malloc 2>&1 | FileCheck
/home/abuild/rpmbuild/BUILD/llvm/projects/compiler-rt/lib/msan/lit_tests/allocator_returns_null.cc
--check-prefix=CHECK-mCRASH
MSAN_OPTIONS=allocator_may_return_null=0 not
/home/abuild/rpmbuild/BUILD/llvm/stage2/projects/compiler-rt/lib/msan/lit_tests/Output/allocator_returns_null.cc.tmp
malloc 2>&1 | FileCheck
/home/abuild/rpmbuild/BUILD/llvm/projects/compiler-rt/lib/msan/lit_tests/allocator_returns_null.cc
--check-prefix=CHECK-mCRASH
MSAN_OPTIONS=allocator_may_return_null=1
/home/abuild/rpmbuild/BUILD/llvm/stage2/projects/compiler-rt/lib/msan/lit_tests/Output/allocator_returns_null.cc.tmp
malloc 2>&1 | FileCheck
/home/abuild/rpmbuild/BUILD/llvm/projects/compiler-rt/lib/msan/lit_tests/allocator_returns_null.cc
--check-prefix=CHECK-mNULL
MSAN_OPTIONS=allocator_may_return_null=0 not
/home/abuild/rpmbuild/BUILD/llvm/stage2/projects/compiler-rt/lib/msan/lit_tests/Output/allocator_returns_null.cc.tmp
calloc 2>&1 | FileCheck
/home/abuild/rpmbuild/BUILD/llvm/projects/compiler-rt/lib/msan/lit_tests/allocator_returns_null.cc
--check-prefix=CHECK-cCRASH
MSAN_OPTIONS=allocator_may_return_null=1
/home/abuild/rpmbuild/BUILD/llvm/stage2/projects/compiler-rt/lib/msan/lit_tests/Output/allocator_returns_null.cc.tmp
calloc 2>&1 | FileCheck
/home/abuild/rpmbuild/BUILD/llvm/projects/compiler-rt/lib/msan/lit_tests/allocator_returns_null.cc
--check-prefix=CHECK-cNULL
MSAN_OPTIONS=allocator_may_return_null=0 not
/home/abuild/rpmbuild/BUILD/llvm/stage2/projects/compiler-rt/lib/msan/lit_tests/Output/allocator_returns_null.cc.tmp
calloc-overflow 2>&1 | FileCheck
/home/abuild/rpmbuild/BUILD/llvm/projects/compiler-rt/lib/msan/lit_tests/allocator_returns_null.cc
--check-prefix=CHECK-coCRASH
MSAN_OPTIONS=allocator_may_return_null=1
/home/abuild/rpmbuild/BUILD/llvm/stage2/projects/compiler-rt/lib/msan/lit_tests/Output/allocator_returns_null.cc.tmp
calloc-overflow 2>&1 | FileCheck
/home/abuild/rpmbuild/BUILD/llvm/projects/compiler-rt/lib/msan/lit_tests/allocator_returns_null.cc
--check-prefix=CHECK-coNULL
MSAN_OPTIONS=allocator_may_return_null=0 not
/home/abuild/rpmbuild/BUILD/llvm/stage2/projects/compiler-rt/lib/msan/lit_tests/Output/allocator_returns_null.cc.tmp
realloc 2>&1 | FileCheck
/home/abuild/rpmbuild/BUILD/llvm/projects/compiler-rt/lib/msan/lit_tests/allocator_returns_null.cc
--check-prefix=CHECK-rCRASH
MSAN_OPTIONS=allocator_may_return_null=1
/home/abuild/rpmbuild/BUILD/llvm/stage2/projects/compiler-rt/lib/msan/lit_tests/Output/allocator_returns_null.cc.tmp
realloc 2>&1 | FileCheck
/home/abuild/rpmbuild/BUILD/llvm/projects/compiler-rt/lib/msan/lit_tests/allocator_returns_null.cc
--check-prefix=CHECK-rNULL
MSAN_OPTIONS=allocator_may_return_null=0 not
/home/abuild/rpmbuild/BUILD/llvm/stage2/projects/compiler-rt/lib/msan/lit_tests/Output/allocator_returns_null.cc.tmp
realloc-after-malloc 2>&1 | FileCheck
/home/abuild/rpmbuild/BUILD/llvm/projects/compiler-rt/lib/msan/lit_tests/allocator_returns_null.cc
--check-prefix=CHECK-mrCRASH
MSAN_OPTIONS=allocator_may_return_null=1
/home/abuild/rpmbuild/BUILD/llvm/stage2/projects/compiler-rt/lib/msan/lit_tests/Output/allocator_returns_null.cc.tmp
realloc-after-malloc 2>&1 | FileCheck
/home/abuild/rpmbuild/BUILD/llvm/projects/compiler-rt/lib/msan/lit_tests/allocator_returns_null.cc
--check-prefix=CHECK-mrNULL
--
Exit Code: 1

Command Output (stderr):
--
clang-3.4: error: unsupported option '-fsanitize=memory' for target
'i386-suse-linux'

2. Thread sanitizer is not supported either?

FAIL: ThreadSanitizer :: fd_socket_norace.cc (16543 of 16692)
******************** TEST 'ThreadSanitizer :: fd_socket_norace.cc' FAILED
********************
Script:
--
/home/abuild/rpmbuild/BUILD/llvm/stage2/bin/clang --driver-mode=g++
-fsanitize=thread -g -Wall -lpthread -ldl -O1
/home/abuild/rpmbuild/BUILD/llvm/projects/compiler-rt/lib/tsan/lit_tests/fd_socket_norace.cc
-o
/home/abuild/rpmbuild/BUILD/llvm/stage2/projects/compiler-rt/lib/tsan/lit_tests/Output/fd_socket_norace.cc.tmp
&&
/home/abuild/rpmbuild/BUILD/llvm/stage2/projects/compiler-rt/lib/tsan/lit_tests/Output/fd_socket_norace.cc.tmp
2>&1 | FileCheck
/home/abuild/rpmbuild/BUILD/llvm/projects/compiler-rt/lib/tsan/lit_tests/fd_socket_norace.cc
--
Exit Code: 1

Command Output (stderr):
--
clang-3.4: error: unsupported option '-fsanitize=thread' for target
'i386-suse-linux'

Note that if indeed its not supported the test should not run at all.

Correct, neither TSan nor MSan work on 32-bit platforms. We should properly
disable running tests then. I'll take a look at this.

Thanks for the clarification, please take care of disabling these tests for
the 3.4 release.

Does the attached patch fixes TSan/MSan problems for you in release branch?

zdiff.disable_tsan_msan (2.63 KB)

Yes, thanks it does! Now I can see there are some other testsuite failures which I will report now.

Submitted this patch and merged it into release_34.