diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2017-10-13 16:27:13 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2018-01-26 06:14:01 +0000 |
commit | 6dbf3576093858d981d8321b00f0b19faa7cf217 (patch) | |
tree | f0cd94faba327b0a1f645cbf548d542de7760152 /src/concurrent | |
parent | e5c02b2579f53b50120ba19b7d041818e915be28 (diff) |
Fix asserts and crashes in QWinEventNotifier activation loop
The backwards iteration was done under the assumption that the only
valid modification of the winEventNotifierList in a slot connected to
activated() would be the removal of the notifier itself. This is wrong.
Instead, iterate forwards, like before 85403d0a, and check the index
against the current list size in every iteration. This ensures that we
do not run out of bounds while the list is modified.
Also, retry the activation loop if the list was modified by a slot
connected to activated(). This ensures that all notifiers with signaled
handles are activated.
Task-number: QTBUG-65940
Change-Id: I25f305463b9234f391abc51fe0628d02f49b6931
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/concurrent')
0 files changed, 0 insertions, 0 deletions