summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qwindowspipereader_p.h
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2017-07-12 14:20:54 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2017-07-17 11:20:47 +0000
commitc7ec07d40115bef849574c81d619b629af9434a9 (patch)
treeb794a497d90794719a311b6f86f3e62372771bb1 /src/corelib/io/qwindowspipereader_p.h
parent0345608d169d7c59768e461a9ec61bb7563cbaa6 (diff)
Do not wait in QWindowsPipe{Reader|Writer}::stop()
A deadlock can occur if the user does QLocalSocket *ls = new QLocalSocket; ls->moveToThread(t); ... delete ls; Then QLocalSocket calls QWindowsPipeReader::stop() in a different thread than the I/O operation is running in. The waitForNotified(-1) call would then wait indefinitely until the I/O thread is in alertable wait state again. Especially on application shut down this might never be the case, and the application would deadlock. Solve this by detaching the Overlapped object from the QWindowsPipe{Reader|Writer} in stop() and delete it in the callback. Task-number: QTBUG-61643 Change-Id: Ie262d75c5fd92ac7cf7dfcdbf1519050be9fd3c4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/corelib/io/qwindowspipereader_p.h')
-rw-r--r--src/corelib/io/qwindowspipereader_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qwindowspipereader_p.h b/src/corelib/io/qwindowspipereader_p.h
index 74ff5250ac..e52aa4c33d 100644
--- a/src/corelib/io/qwindowspipereader_p.h
+++ b/src/corelib/io/qwindowspipereader_p.h
@@ -105,7 +105,7 @@ private:
};
HANDLE handle;
- Overlapped overlapped;
+ Overlapped *overlapped;
qint64 readBufferMaxSize;
QRingBuffer readBuffer;
qint64 actualReadBufferSize;