[llvm-bugs] [Bug 50447] New: test/memprof/TestCases/stress_dtls.c fails on CentOS
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat May 22 12:01:33 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=50447
Bug ID: 50447
Summary: test/memprof/TestCases/stress_dtls.c fails on CentOS
Product: compiler-rt
Version: 12.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: asan
Assignee: unassignedbugs at nondot.org
Reporter: bryanpkc at gmail.com
CC: llvm-bugs at lists.llvm.org
When build LLVM 12 with GCC 9.3.0, and running "make check-memprof" on CentOS
7, I see these failures:
Failed Tests (2):
MemProfiler-x86_64-linux :: TestCases/stress_dtls.c
MemProfiler-x86_64-linux-dynamic :: TestCases/stress_dtls.c
The failing step is this:
// RUN:
%env_memprof_opts=log_path=stderr:verbosity=2:intercept_tls_get_addr=0 setarch
`uname -m` -R %run %t 10 2 2>&1 | FileCheck %s --check-prefix=CHECK0
The CHECK0-NOT pattern inside the test case checks that the word
"__tls_get_addr" is not reported. If I run the command by hand outside
llvm-lit, it succeeds:
$ env MEMPROF_OPTIONS=log_path=stderr:verbosity=2:intercept_tls_get_addr=0
$PWD/build/projects/compiler-rt/test/memprof/X86_64LinuxConfig/TestCases/Output/stress_dtls.c.tmp
10 2 2>&1 | build/bin/FileCheck
compiler-rt/test/memprof/TestCases/stress_dtls.c --check-prefix=CHECK0 && echo
OK
OK
However, llvm-lit prepends ${LLVM_BINARY_DIR}/bin to the $PATH variable, which
changes the behaviour of the test:
$ env PATH=$PWD/build/bin:$PATH
MEMPROF_OPTIONS=log_path=stderr:verbosity=2:intercept_tls_get_addr=0
$PWD/build/projects/compiler-rt/test/memprof/X86_64LinuxConfig/TestCases/Output/stress_dtls.c.tmp
10 2 2>&1 | build/bin/FileCheck
compiler-rt/test/memprof/TestCases/stress_dtls.c --check-prefix=CHECK0 && echo
OK
compiler-rt/test/memprof/TestCases/stress_dtls.c:25:16: error: CHECK0-NOT:
excluded string found in input
// CHECK0-NOT: __tls_get_addr
^
<stdin>:253:31: note: found here
#2 0x43168d in __interceptor___tls_get_addr
/home/bryanpkc/llvm/compiler-rt/lib/memprof/../sanitizer_common/sanitizer_common_interceptors.inc:5299:35
^~~~~~~~~~~~~~
Input file: <stdin>
Check file: compiler-rt/test/memprof/TestCases/stress_dtls.c
-dump-input=help explains the following input dump.
Input was:
<<<<<<
.
.
.
248: #2 0x7f84e0aed3d4 in __libc_start_main (/lib64/libc.so.6+0x223d4)
249:
250: Stack for id 1207959553:
251: #0 0x450547 in __libc_memalign
/home/bryanpkc/llvm/compiler-rt/lib/memprof/memprof_malloc_linux.cpp:165:3
252: #1 0x7f84e1dc5f67 in tls_get_addr_tail
(/lib64/ld-linux-x86-64.so.2+0x11f67)
253: #2 0x43168d in __interceptor___tls_get_addr
/home/bryanpkc/llvm/compiler-rt/lib/memprof/../sanitizer_common/sanitizer_common_interceptors.inc:5299:35
not:25 !~~~~~~~~~~~~~
error: no match expected
254: #3 0x43168d in __tls_get_addr
/home/bryanpkc/llvm/compiler-rt/lib/memprof/../sanitizer_common/sanitizer_common_interceptors.inc:5296:1
255:
256: Stack for id 1468006401:
257: #0 0x44fd9f in calloc
/home/bryanpkc/llvm/compiler-rt/lib/memprof/memprof_malloc_linux.cpp:136:3
258: #1 0x7f84e1dc66c4 in _dl_allocate_tls
(/lib64/ld-linux-x86-64.so.2+0x126c4)
.
.
.
>>>>>>
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210522/76b2eb65/attachment.html>
More information about the llvm-bugs
mailing list