A follow-up for D39508, with memory sanitizer changes.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Rebased, added back accidentally lost get_test_cc_for_arch(...).
test/msan/CMakeLists.txt | ||
---|---|---|
13 ↗ | (On Diff #125266) | Oops. |
test/msan/dtls_test.c | ||
10 ↗ | (On Diff #125266) | [6/7] Running the MemorySanitizer tests FAIL: MemorySanitizer-X86_64 :: dtls_test.c (618 of 842) ******************** TEST 'MemorySanitizer-X86_64 :: dtls_test.c' FAILED ******************** Script: -- /build/llvm-build-Clang-release/./bin/clang -fsanitize=memory -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -fno-optimize-sibling-calls -gline-tables-only -g /build/compiler-rt/test/msan/dtls_test.c -o /build/llvm-build-Clang-release/projects/compiler-rt/test/msan/X86_64/Output/dtls_test.c.tmp /build/llvm-build-Clang-release/./bin/clang -fsanitize=memory -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -fno-optimize-sibling-calls -gline-tables-only -g /build/compiler-rt/test/msan/dtls_test.c -DBUILD_SO -fPIC -o /build/llvm-build-Clang-release/projects/compiler-rt/test/msan/X86_64/Output/dtls_test.c.tmp-so.so -shared /build/llvm-build-Clang-release/projects/compiler-rt/test/msan/X86_64/Output/dtls_test.c.tmp 2>&1 -- Exit Code: 77 Command Output (stdout): -- ==5943==WARNING: MemorySanitizer: use-of-uninitialized-value #0 0x48d683 in Thread1 /build/compiler-rt/test/msan/dtls_test.c:22:7 #1 0x7f223997f518 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x7518) #2 0x7f2238d7ca5e in clone (/lib/x86_64-linux-gnu/libc.so.6+0xeca5e) SUMMARY: MemorySanitizer: use-of-uninitialized-value /build/compiler-rt/test/msan/dtls_test.c:22:7 in Thread1 Exiting -- ******************** FAIL: MemorySanitizer-lld-X86_64 :: dtls_test.c (749 of 842) ******************** TEST 'MemorySanitizer-lld-X86_64 :: dtls_test.c' FAILED ******************** Script: -- /build/llvm-build-Clang-release/./bin/clang -fsanitize=memory -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -fno-optimize-sibling-calls -fuse-ld=lld -gline-tables-only -g /build/compiler-rt/test/msan/dtls_test.c -o /build/llvm-build-Clang-release/projects/compiler-rt/test/msan/lld-X86_64/Output/dtls_test.c.tmp /build/llvm-build-Clang-release/./bin/clang -fsanitize=memory -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -fno-optimize-sibling-calls -fuse-ld=lld -gline-tables-only -g /build/compiler-rt/test/msan/dtls_test.c -DBUILD_SO -fPIC -o /build/llvm-build-Clang-release/projects/compiler-rt/test/msan/lld-X86_64/Output/dtls_test.c.tmp-so.so -shared /build/llvm-build-Clang-release/projects/compiler-rt/test/msan/lld-X86_64/Output/dtls_test.c.tmp 2>&1 -- Exit Code: 134 Command Output (stdout): -- /build/llvm-build-Clang-release/projects/compiler-rt/test/msan/lld-X86_64/Output/dtls_test.c.tmp-so.so: undefined symbol: __msan_retval_tls dtls_test.c.tmp: /build/compiler-rt/test/msan/dtls_test.c:44: int main(int, char **): Assertion `handle != 0' failed. -- Command Output (stderr): -- /build/llvm-build-Clang-release/projects/compiler-rt/test/msan/lld-X86_64/Output/dtls_test.c.script: line 3: 9429 Aborted /build/llvm-build-Clang-release/projects/compiler-rt/test/msan/lld-X86_64/Output/dtls_test.c.tmp 2>&1 -- ******************** Testing Time: 45.72s ******************** Failing Tests (2): MemorySanitizer-X86_64 :: dtls_test.c MemorySanitizer-lld-X86_64 :: dtls_test.c Expected Passes : 838 Expected Failures : 2 Unexpected Failures: 2 FAILED: projects/compiler-rt/test/msan/CMakeFiles/check-msan cd /build/llvm-build-Clang-release/projects/compiler-rt/test/msan && /usr/bin/python2.7 /build/llvm-build-Clang-release/./bin/llvm-lit -sv /build/llvm-build-Clang-release/projects/compiler-rt/test/msan/X86_64 /build/llvm-build-Clang-release/projects/compiler-rt/test/msan/lld-X86_64 /build/llvm-build-Clang-release/projects/compiler-rt/test/msan/Unit ninja: build stopped: subcommand failed. |
test/msan/dtls_test.c | ||
---|---|---|
10 ↗ | (On Diff #125266) | The first failure means that dtls handling in sanitizer_common is broken on your machine. Must be a new or otherwise unsupported glibc version. It's a mess. Out of curiosity, what is your version? The second is even more interesting. LLD does not re-export msan interface symbols from executables. Compare objdump -T path/to/binary | grep __msan with and without lld. It's a dumb bug in lld, it's great that we caught it. I'll fix. |
LLD fixed in r319860.
Please check that you see the same error in the dtls test with and without lld, and remove the XFAIL line.
Yep, i see the same failure now, thanks!
So the msan Unit tests, do they also need these LLD (lto in the future) flavors?
test/msan/dtls_test.c | ||
---|---|---|
10 ↗ | (On Diff #125266) |
This is debian sid, amd64. $ dpkg -l | grep glibc ii glibc-doc 2.25-3 all GNU C Library: Documentation ii glibc-doc-reference 2.25-1 all GNU C Library: Documentatio
Ooh, nice, so this doubling of the test time actually caught something :) |
Okay, good to know.
I'll try to finish up with LIT tests (asan/???) and then try to go over unittests.