Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
6.9
-
None
-
a72077a88 (dev), 8181c4868 (6.9), 73a74d440 (6.8), e9e8364be (tqtc/lts-6.5)
Description
A specific build combination causes a build error:
- GCC < 15
- TSAN enabled (-DFEATURE_sanitize_thread=ON)
- developer build (-DFEATURE_developer_build=ON – which in turn enables -Werror)
- PCH enabled (on by default)
The error is:
In function ‘void std::atomic_thread_fence(memory_order)’,
inlined from ‘TestNamespace::QtGlobalStatic::Holder<QGS>::~Holder() [with QGS = TestNamespace::{anonymous}::Q_QGS_sharedData]’ at qtbase/src/corelib/global/qglobalstatic.h:51:33:
/g/gcc-14/include/c++/14.2.0/bits/atomic_base.h:146:26: error: ‘atomic_thread_fence’ is not supported with ‘-fsanitize=thread’ [-Werror=tsan]
146 | { __atomic_thread_fence(int(__m)); }
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
cc1plus: all warnings being treated as errors
That code is actually protected by a pragma, disabling the warning; but pragmas are not fully honored in PCHs due to this GCC bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64117
Disabling PCH fixes the issue in such a config.
Attachments
For Gerrit Dashboard: QTBUG-134415 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
629376,4 | Disable -Werror=tsan on GCC < 15 | dev | qt/qtbase | Status: MERGED | +2 | 0 |
630091,2 | Disable -Werror=tsan on GCC < 15 | 6.9 | qt/qtbase | Status: MERGED | +2 | 0 |
630291,3 | Disable -Werror=tsan on GCC < 15 | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |
638794,4 | Disable -Werror=tsan on GCC < 15 | tqtc/lts-6.5 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |