-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
/vsicurl/: fix potential multithreaded crash when downloading the sam…
…e region in parallel and that the download fails If 2 threads tried to download the same region at the same time, one of them would wait for the first one to have finished. But if that download failed, the waiting thread would then wrongly try to unregister the region in m_oMapRegionInDownload (the first thread has already done that), resulting in either an assertion in debug mode on ```CPLAssert(oIter != m_oMapRegionInDownload.end())``` in NotifyStopDownloadRegion() or a crash later when trying to lock region.oMutex which would be random data.
- Loading branch information
Showing
2 changed files
with
37 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters