qt6-bb10/tests/auto/corelib
Fabian Kosmale 7a415a051a Avoid accessing deleted binding data in grouped updates
This fixes a use-after-free in QPropertyDelayedNotifications::notify.

Before this patch, evaluateBindings or a notify from a property index
might have caused the originalBindingData to become reallocated.
However, at that point, we've already restored the original bindingData
in evaluateBindings, so we won't track updates, and thus won't adjust
originalBindingStatus, which will then point to already freed data.

To remedy this, we no longer do the notification with data fetched from
originalBindingData, but instead use the information we have in the
proxyData.
We also need to enure that referenced bindings do not get deleted; for
that we keep the PendingBindingObserverList alive for the whole duration
of the endPropertyUpdateGroup.

As we now have the PendingBindingObserverList, we use it for the
notification logic, and only notify change handlers in
QPropertyDelayedNotifications::notify. That will allow a follow-up
cleanup of QPropertyObserverPointer::notify, and aligns the logic for
grouped updates with the logic for "nornal", non-grouped updates.

Amends f1b1773d0a.

Task-number: QTBUG-110899
Pick-to: 6.5 6.4 6.2
Change-Id: Iae826e620d9614b7df39d86d8a28c48c8a5c4881
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-02-08 16:54:26 +01:00
..
animation Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
global QTypeInfo: remove further usages of isPointer / isIntegral 2022-12-30 01:51:27 +01:00
io Avoid potential data races caused by qt_ntfs_permission_lookup 2023-02-08 12:59:19 +01:00
ipc IPC: switch the default key type on Unix to POSIX realtime 2023-01-22 13:02:11 -03:00
itemmodels Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
kernel Avoid accessing deleted binding data in grouped updates 2023-02-08 16:54:26 +01:00
mimetypes QMimeDatabase: add a test to ensure we can detect Unix specials 2023-02-02 12:17:25 -08:00
platform CMake: Remove direct qt_android_generate_deployment_settings call 2022-12-15 20:23:28 +01:00
plugin QUuid: add the ability to specify the byte order for 128-bit IDs 2022-12-16 19:29:10 +01:00
serialization QXmlStreamWriter: fix a thinko in doWriteToDevice(QSV) 2022-12-16 22:58:11 +01:00
text Update CLDR to v42 2023-02-07 19:04:11 +01:00
thread QPromise: improve documentation snippet 2023-01-09 10:03:48 +01:00
time Move qtLocalTime() to qtenvironmentvariables.cpp as qLocalTime() 2023-02-03 14:45:31 +01:00
tools QVarLengthArray: fix off-by-size() bug in growBy() 2023-01-20 14:48:20 +01:00
CMakeLists.txt IPC: Move QSharedMemory and QSystemSemaphore from kernel/ to ipc/ 2023-01-22 13:01:53 -03:00