Description
The tlm CMake function install_sanitizer_library() locates the wrong version of the TSan runtime library when building with Clang - instead of finding the GCC 7.3 library, it finds the original Ubuntu 16.04 GCC 5 one:
-- Found TSan at: /usr/lib/x86_64-linux-gnu/libtsan.so.0 installing to: /home/couchbase/couchbase/install/lib
|
The new GCC 7.3.0 library is located in /usr/local/lib64.
This issue is highlighted when compiling EE with Clang-9 and TSan as a shared library, as the following runtime linker error is seen with the audit_generator when it attempts to generate the audit event definitions:
$ ../../auditevent_generator -r /home/couchbase/couchbase -b /home/couchbase/couchbase/build -o /home/couchbase/couchbase/build/kv_engine/auditd/audit_events.json -i /home/couchbase/couchbase/kv_engine/auditd/etc/module_descriptors.json
|
../../auditevent_generator: symbol lookup error: ../../auditevent_generator: undefined symbol: __tsan_unaligned_read16
|
The symbol __tsan_unaligned_read16 is not present in the older GCC5 libtsan.so, only the newer GCC 7.3.0 one:
$ nm -D /usr/lib/x86_64-linux-gnu/libtsan.so.0|grep __tsan_unaligned_read16
|
<EOF>
|
$ nm -D /usr/local/lib64/libtsan.so.0|grep __tsan_unaligned_read16
|
0000000000065350 T __tsan_unaligned_read16
|
Attachments
Issue Links
- relates to
-
MB-41805 False positive TSan race under FollyExecutorPool due to mixed GCC / Clang built libraries
- Closed
For Gerrit Dashboard: MB-41988 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
137964,3 | MB-41988: Locate sanitizer runtime libs via dynamic linker | master | tlm | Status: MERGED | +2 | +1 |