Go to file
Marc Mutz 11becbe910 QTzTimeZonePrivate: fix UB (data race on m_icu)
The fallback m_icu QIcuTimeZonePrivate is lazily constructed, which
means that two threads each with their own copy of a QTimeZone with a
shared QTzTimeZonePrivate will race over who gets to set m_icu,
e.g. when concurrently calling QTimeZone::displayName().

Fix by protecting m_icu with a mutex. For simplicity, use a static
mutex, not a per-instance one (which would delete the
QTzTimeZonePrivate copy constructor, which clone() relies on). This is
sufficient for 5.15. For Qt 6, going forward, we could make this
lock-less, too.

[ChangeLog][QtCore][QTimeZone] Fixed a data race on Unix platforms when
implicitly-shared copies of QTimeZone objects were used in certain ways
(e.g. calling displayName()) from different threads and Qt was
configured with ICU support.

Pick-to: 6.3 6.2 5.15
Change-Id: I7e57aef3dd44a90289ad86d0578ece1e54920730
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-01-12 19:37:21 +00:00
.github/workflows Repair github action workflow 2021-11-10 18:57:33 +01:00
bin Provide a qtpaths wrapper script when cross-building Qt 2021-11-08 13:41:03 +01:00
cmake CMake: Add C/C++ compiler options to C/C++ sources only 2022-01-08 18:08:10 +01:00
coin Properly wait for the Android emulator to fully boot 2022-01-07 19:34:50 +01:00
config.tests wasm: add simd support 2021-10-05 11:30:06 +10:00
dist Add Qt 6.0.0 changes file 2020-11-16 10:02:08 +02:00
doc Doc: Fix typo in \externalpage command 2022-01-07 17:13:18 +01:00
examples bindablesubscription: Remove duplicated file entry 2021-12-19 14:38:27 +01:00
lib Purge all fonts 2015-08-18 19:59:14 +00:00
libexec Fix various configure time warnings about missing QT_BEGIN_NAMESPACE 2021-11-01 17:17:29 +02:00
mkspecs Update copyright year to 2022 2022-01-04 12:44:19 +01:00
qmake Fix wrong QT_HOST_* values when qt.conf is present 2022-01-12 18:28:24 +01:00
src QTzTimeZonePrivate: fix UB (data race on m_icu) 2022-01-12 19:37:21 +00:00
tests rhi: Add queries for vertex input/output limits 2022-01-12 20:37:20 +01:00
util qt-testrunner: disable JUnit XML test logs 2022-01-12 16:14:18 +01:00
.cmake.conf Revert "CMake: Warn if cmake_minimum_required has an unsupported low version" 2021-10-04 15:55:10 +02:00
.gitattributes Give batch files CRLF line endings 2020-11-04 15:02:29 +00:00
.gitignore Assume qhelpgenerator in libexec instead of bin 2021-11-08 19:27:32 +01:00
.lgtm.yml Skip LGTM analysis for the bootstrap library and tools 2020-07-16 01:04:34 +02:00
.tag Update the git-archive export options 2012-09-07 15:39:31 +02:00
CMakeLists.txt Use REALPATH based check for symbolic links on Windows 2022-01-07 14:31:38 +01:00
conanfile.py use short_path attribute 2021-12-07 14:19:38 +00:00
config_help.txt Document that schannel is on by default 2021-10-06 15:05:20 +02:00
configure Remove unsupported, host-related options from configure shell script 2021-08-05 02:44:27 +02:00
configure.bat Fix our usage of CMake script mode in Windows configure 2021-08-20 19:44:43 +02:00
configure.cmake Support configure -platform linux-clang-libc++ 2021-12-14 20:04:43 +01:00
dependencies.yaml Re-add dependencies.yaml now that qt5.git wip/qt6 builds fine 2019-09-18 13:19:31 +02:00
LICENSE.FDL Remove trailing whitespace in LICENSE.FDL 2021-11-26 18:28:49 +01:00
LICENSE.GPL2 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.GPL3 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.GPL3-EXCEPT Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.LGPL3 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.QT-LICENSE-AGREEMENT Update latest qt license agreement 2021-12-02 14:16:49 +00:00
qt_cmdline.cmake configure: Remove vestiges of handling QMAKE_* variable assignments 2021-11-24 10:47:10 +01:00
sync.profile Implement generating of a module cpp export header 2021-06-24 20:40:49 +02:00