diff options
author | Oswald Buddenhagen <oswald.buddenhagen@digia.com> | 2013-04-19 16:11:05 (GMT) |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-08-12 16:58:01 (GMT) |
commit | 9c2c12b3ef1a17d54559d229bd788bcf1b731d55 (patch) | |
tree | 13c6e9dd34ea78930402c5acf67b9dbb3fc24edf /tools/linguist | |
parent | e9ff4a5d3f01ce0e107a1f797446b92a6e52fc0e (diff) | |
download | Qt-9c2c12b3ef1a17d54559d229bd788bcf1b731d55.zip Qt-9c2c12b3ef1a17d54559d229bd788bcf1b731d55.tar.gz Qt-9c2c12b3ef1a17d54559d229bd788bcf1b731d55.tar.bz2 |
restore QProcessEnvironment shared data thread safety on unix
implicit sharing together with 'mutable' is a time bomb.
we need to protect the nameMap, because concurrent "reads" may try to
insert into the hash, which would go boom.
we need to protect the key/value of Hash objects, because while the
refcounting is atomic, the d pointer assignments are not, which would
also go boom.
we can simply use a QMutex to protect the whole environment, because it
is very cheap in the uncontended case.
Task-number: QTBUG-30779
Change-Id: Iaad5720041ca06691d75eb9c6c0e1c120d4a7b46
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
(cherry picked from qtbase/85e61297f7b02297641826332dbdbc845a88c34b)
Diffstat (limited to 'tools/linguist')
0 files changed, 0 insertions, 0 deletions