qt6-bb10/src
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
..
3rdparty SQLite: Update SQLite to v3.37.0 2022-01-06 13:55:53 +00:00
android Recognize system apps also when apk has parent directory 2021-12-08 19:22:36 +02:00
concurrent QtConcurrent::run crashes on program exit 2021-12-20 13:18:26 +01:00
corelib QTzTimeZonePrivate: fix UB (data race on m_icu) 2022-01-12 19:37:21 +00:00
dbus Doc: Use find_package(Qt6 REQUIRED COMPONENTS ...) idiom 2021-12-09 22:20:04 +01:00
entrypoint QtBase: replace windows.h with qt_windows.h 2021-11-23 12:53:46 +08:00
gui rhi: Add queries for vertex input/output limits 2022-01-12 20:37:20 +01:00
network QHttpNetworkConnection: Always set proxy settings to all channels 2022-01-12 16:41:07 +00:00
opengl Doc: Use find_package(Qt6 REQUIRED COMPONENTS ...) idiom 2021-12-09 22:20:04 +01:00
openglwidgets Migrate to autogenerated cpp exports 2021-06-25 19:33:12 +02:00
platformsupport evdevkeyboard: Try opening as read-write first 2021-12-08 13:45:34 +01:00
plugins macOS: Implement QCALayerBackingStore::scroll for improved performance 2022-01-12 18:13:52 +01:00
printsupport Doc: Use find_package(Qt6 REQUIRED COMPONENTS ...) idiom 2021-12-09 22:20:04 +01:00
sql Adapt SQL drivers to Qt 6 change of QVariant::isNull 2022-01-12 17:41:07 +01:00
testlib QTestData: fix streaming of u8 string literals in C++20 mode 2022-01-03 12:22:53 +01:00
tools Update copyright year to 2022 2022-01-04 12:44:19 +01:00
widgets QWizardLayoutInfo: make == and != operators const 2022-01-12 01:03:15 +00:00
xml Doc: Use find_package(Qt6 REQUIRED COMPONENTS ...) idiom 2021-12-09 22:20:04 +01:00
CMakeLists.txt