forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[gdal] Add upstream TIFF fix (microsoft#34586)
- Loading branch information
Showing
5 changed files
with
29 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
diff --git a/frmts/gtiff/geotiff.cpp b/frmts/gtiff/geotiff.cpp | ||
index ed79c0972e0..33846d66513 100644 | ||
--- a/frmts/gtiff/geotiff.cpp | ||
+++ b/frmts/gtiff/geotiff.cpp | ||
@@ -2886,8 +2886,16 @@ static void ThreadDecompressionFunc(void *pData) | ||
psJob->nXBlock, psJob->nYBlock); | ||
if (apoBlocks[i] == nullptr) | ||
{ | ||
+ // Temporary disabling of dirty block fushing, otherwise | ||
+ // we can be in a deadlock situation, where the | ||
+ // GTiffDataset::SubmitCompressionJob() method waits for jobs | ||
+ // to be finished, that can't finish (actually be started) | ||
+ // because this task and its siblings are taking all the | ||
+ // available workers allowed by the global thread pool. | ||
+ GDALRasterBlock::EnterDisableDirtyBlockFlush(); | ||
apoBlocks[i] = poDS->GetRasterBand(iBand)->GetLockedBlockRef( | ||
psJob->nXBlock, psJob->nYBlock, TRUE); | ||
+ GDALRasterBlock::LeaveDisableDirtyBlockFlush(); | ||
if (apoBlocks[i] == nullptr) | ||
return false; | ||
} |
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
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