qt5base-lts/src
Thiago Macieira 188eea0eb4 Fix race condition in getting the system locale data
QSharedDataPointer obeys the regular Qt container thread-safety rules:
it's thread-safe in const methods but not in mutating ones. QSDP::data()
is mutating, which causes a data race. For example, if the contained
QLocalePrivate has a refcount of 2 and two threads see that, both
threads will try to detach and then replace the pointer, but that
pointer replacement is not atomic.

Using QExplicitSharedDataPointer makes the race go away, since data() is
now non-mutating. QESDP is used only to destroy the QLocalePrivate on
program shutdown.

Note that there are still race conditions relating to *updating* the
locale private.

Fixes: QTBUG-73403
Change-Id: Id98140e1c2f0426cabbefffd157ed6ec30a3e08f
Reviewed-by: Thomas Sondergaard <thomas@sondergaard.cc>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-02-01 20:53:34 +00:00
..
3rdparty Update bundled Freetype to 2.9.1 2019-01-31 10:40:41 +00:00
android Remove "/data/local/tmp/qt/" support 2019-01-31 16:10:39 +00:00
angle configure: detect fxc.exe more thoroughly 2018-12-17 21:29:11 +00:00
concurrent QtConcurrent: Unify license headers 2019-01-29 10:41:39 +00:00
corelib Fix race condition in getting the system locale data 2019-02-01 20:53:34 +00:00
dbus QDBusConnection: prevent leaking connection/server on destroy 2018-11-28 11:19:34 +00:00
gui Initialize bit_depth 2019-01-31 12:08:34 +00:00
network http2: skip content-length for content-encoding: gzip/deflate 2019-02-01 14:32:12 +00:00
opengl QtOpenGL: Unify license headers 2019-01-29 10:41:46 +00:00
openglextensions QtOpenGLExtensions: Unify license headers 2019-01-11 11:06:25 +00:00
platformheaders Ability to switch language under platform eglfs/linuxfb 2019-01-25 15:00:07 +00:00
platformsupport Fix merge mistake in 'Avoid picking worse formats when ...' 2019-01-31 15:18:45 +00:00
plugins QMacStyle - fix a weird NSBox geometry 2019-01-31 04:43:51 +00:00
printsupport Fix license header for qprinterinfo.cpp 2019-01-22 15:21:05 +00:00
sql Replace executedQuery when executing a new query 2019-01-30 23:08:04 +00:00
testlib testlib: Add BXPASS and BXFAIL 2019-01-29 12:18:15 +00:00
tools Merge remote-tracking branch 'origin/5.12.1' into 5.12 2019-01-23 10:13:29 +01:00
widgets Fix regression in QPlainTextEdit updating 2019-01-31 11:59:23 +00:00
winmain Use msvc qmake scope where appropriate 2018-11-22 14:16:52 +00:00
xml Merge remote-tracking branch 'origin/5.11' into 5.12 2018-11-09 10:34:33 +01:00
src.pro Move androiddeployqt to qtbase 2018-06-21 11:08:57 +00:00