[Git][debian-gis-team/gdal][upstream] New upstream version 3.13.0~rc2+dfsg

Bas Couwenberg (@sebastic) gitlab at salsa.debian.org
Tue May 5 05:25:19 BST 2026



Bas Couwenberg pushed to branch upstream at Debian GIS Project / gdal


Commits:
72adda69 by Bas Couwenberg at 2026-05-05T05:46:42+02:00
New upstream version 3.13.0~rc2+dfsg
- - - - -


3 changed files:

- NEWS.md
- gcore/gdaldllmain.cpp
- port/cpl_vsil_curl.cpp


Changes:

=====================================
NEWS.md
=====================================
@@ -42,6 +42,7 @@ GDAL 3.12.x bugfix release.
 ## New installed files
 
 * Include files:
+  gdal_mem.h
   gdal_thread_pool.h
   ogr_refcountedptr.h
 


=====================================
gcore/gdaldllmain.cpp
=====================================
@@ -22,13 +22,21 @@
 #include "ogr_api.h"
 
 static bool bInGDALGlobalDestructor = false;
+static bool bInGDALGlobalDestructorFromDLLMain = false;
+
 extern "C" int CPL_DLL GDALIsInGlobalDestructor();
+extern "C" bool CPL_DLL GDALIsInGlobalDestructorFromDLLMain();
 
 int GDALIsInGlobalDestructor()
 {
     return bInGDALGlobalDestructor;
 }
 
+bool GDALIsInGlobalDestructorFromDLLMain()
+{
+    return bInGDALGlobalDestructorFromDLLMain;
+}
+
 void CPLFinalizeTLS();
 
 static bool bGDALDestroyAlreadyCalled = FALSE;
@@ -130,6 +138,7 @@ extern "C" int WINAPI DllMain(HINSTANCE /* hInstance */, DWORD dwReason,
     }
     else if (dwReason == DLL_PROCESS_DETACH)
     {
+        bInGDALGlobalDestructorFromDLLMain = true;
         GDALDestroy();
     }
 


=====================================
port/cpl_vsil_curl.cpp
=====================================
@@ -114,6 +114,8 @@ int VSICurlUninstallReadCbk(VSILFILE * /* fp */)
 
 constexpr const char *const VSICURL_PREFIXES[] = {"/vsicurl/", "/vsicurl?"};
 
+extern "C" bool CPL_DLL GDALIsInGlobalDestructorFromDLLMain();
+
 /***********************************************************ù************/
 /*                    VSICurlAuthParametersChanged()                    */
 /************************************************************************/
@@ -539,7 +541,7 @@ VSICurlHandle::~VSICurlHandle()
     }
     if (m_hCurlMultiHandleForAdviseRead)
     {
-        curl_multi_cleanup(m_hCurlMultiHandleForAdviseRead);
+        VSICURLMultiCleanup(m_hCurlMultiHandleForAdviseRead);
     }
 
     if (!m_bCached)
@@ -6455,6 +6457,16 @@ void VSICURLDestroyCacheFileProp()
 
 void VSICURLMultiCleanup(CURLM *hCurlMultiHandle)
 {
+#if defined(CURL_AT_LEAST_VERSION) && defined(_WIN32)
+    // Since curl 8.20.0, auxiliary threads are used for DNS resolution
+    // Trying to join them when detaching the DLL results in a hang.
+    // See https://github.com/curl/curl/issues/21466#issuecomment-4372138595
+#if CURL_AT_LEAST_VERSION(8, 20, 0)
+    if (GDALIsInGlobalDestructorFromDLLMain())
+        curl_multi_setopt(hCurlMultiHandle, CURLMOPT_QUICK_EXIT, 1L);
+#endif
+#endif
+
     void *old_handler = CPLHTTPIgnoreSigPipe();
     curl_multi_cleanup(hCurlMultiHandle);
     CPLHTTPRestoreSigPipeHandler(old_handler);



View it on GitLab: https://salsa.debian.org/debian-gis-team/gdal/-/commit/72adda69c775cc6c777e45b13c4aeaec111b2725

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/gdal/-/commit/72adda69c775cc6c777e45b13c4aeaec111b2725
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20260505/baad2728/attachment-0001.htm>


More information about the Pkg-grass-devel mailing list