Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
None
-
6.0
-
None
-
303178748595f487cffc7249c8dc9bd46432253b (qt/qtbase/dev)
Description
Running make on Ubuntu fails to build Qt from sources with address sanitizer on. The messages I see:
qt5/qtbase/src/corelib/kernel/qmetatype.cpp:115: undefined reference to `__asan_option_detect_stack_use_after_return' qt5/qtbase/src/corelib/kernel/qmetatype.cpp:115: undefined reference to `__asan_stack_malloc_2' qt5/qtbase/src/corelib/kernel/qmetatype.cpp:115: undefined reference to `__asan_report_store8' qt5/qtbase/src/corelib/kernel/qmetatype.cpp:118: undefined reference to `__asan_report_load8'
So it looks like something is not linked to binaries when building.
At the same time, GCC 7 with address sanitizer works without issues, so it seems that clang/llvm is problematic.
My setup:
Ubuntu 18.04
Clang-10 (with LLVM 10 tools)
CMake arguments to enable the ASan build:
-DCMAKE_LINKER=lld-10 -DECM_ENABLE_SANITIZERS=address -DCMAKE_CXX_COMPILER=clang++-10 -DFEATURE_sanitize_address=ON -DCMAKE_C_COMPILER=clang-10
Attachments
Issue Links
- relates to
-
QTBUG-83929 Scan through and port all defines, compile and link flags from mkspecs/foo/bar.conf files to relevant Qt::Platform or Qt::PlatformCommonInternal targets
- Closed
For Gerrit Dashboard: QTBUG-86879 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
315282,2 | CMake: Fix sanitizer build when using Clang on Linux | dev | qt/qtbase | Status: MERGED | +2 | 0 |