Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
4.7.3
-
None
Description
Scenario:
Request A causes POST on url X ->
QAbstractNetworkCache::prepare() returns a device Y
Request A data starts streaming to device Y
Request B starts another POST on URL X ->
QNetworkAccessHttpBackend invalidates cache for url X by calling QAbstractNetworkCache::remove(X), which in turn deletes the C++ object for device Y
Request A receives the next chunk of data ->
Request A tries to stream data to device Y, but the pointer is pointing to freed memory -> BOOM
Or more higher level:
Overlapping operations on a QNetworkAccessManager with same URL may step on each others toes when interacting with the cache.
One possible solution could be to extend QAbstractNetworkCache with another method which does remove by device, and change the behavior of remove so it doesn't do anything if any devices are currently handed out, except that this changes its current behavior...
Any ideas?
Attachments
Issue Links
- relates to
-
QTBUG-19088 tst_qnetworkdiskcache: Add a testcase
- Open