]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-149879: Fix test_c_stack_unwind on Cygwin (#150084)
authorVictor Stinner <vstinner@python.org>
Fri, 22 May 2026 19:32:44 +0000 (21:32 +0200)
committerGitHub <noreply@github.com>
Fri, 22 May 2026 19:32:44 +0000 (21:32 +0200)
On Cygwin, the Python library is called "cygpython3.16.dll".

Modules/_testinternalcapi.c

index b8a22c439e853d931f5f2ceb019577fc2e00c1ef..088f0e46c6c65877f1e6ab34ca597bf746a072c3 100644 (file)
@@ -240,10 +240,17 @@ classify_address(uintptr_t addr, int jit_enabled, PyInterpreterState *interp)
         if (strncmp(base, "python", 6) == 0) {
             return "python";
         }
+#ifdef __CYGWIN__
+        // Match Cygwin "cygpython3.16.dll"
+        if (strncmp(base, "cygpython", 9) == 0) {
+            return "python";
+        }
+#else
         // Match "libpython3.15.so.1.0"
         if (strncmp(base, "libpython", 9) == 0) {
             return "python";
         }
+#endif
         return "other";
     }
 #ifdef _Py_JIT