[llvm-bugs] [Bug 42894] New: FreeBSD needs -pthread link flag for dynamic ASan tests
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Aug 5 13:31:27 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=42894
Bug ID: 42894
Summary: FreeBSD needs -pthread link flag for dynamic ASan
tests
Product: new-bugs
Version: 9.0
Hardware: PC
OS: FreeBSD
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: dimitry at andric.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org
When running the dynamic ASan tests on FreeBSD amd64, most of them will fail
with an error similar to:
==7913==AddressSanitizer CHECK failed: compiler-rt/lib/asan/asan_posix.cc:49
"((0)) == ((pthread_key_create(&tsd_key, destructor)))" (0x0, 0x4e)
This is because due to the dynamic linking order, the main executable will have
pthread stubs instead of the "full" pthread functions, leading to the above
error. This can be worked around by explicitly adding -pthread or -lpthread to
the linker flags for the executables for the dynamic ASan tests.
Review with patch posted here: https://reviews.llvm.org/D39254
--
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/20190805/4d1e21e6/attachment.html>
More information about the llvm-bugs
mailing list