From: Victor Stinner Date: Fri, 22 May 2026 19:32:44 +0000 (+0200) Subject: gh-149879: Fix test_c_stack_unwind on Cygwin (#150084) X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=81153601539c009dcc6b68a515541f3025aad122;p=thirdparty%2FPython%2Fcpython.git gh-149879: Fix test_c_stack_unwind on Cygwin (#150084) On Cygwin, the Python library is called "cygpython3.16.dll". --- diff --git a/Modules/_testinternalcapi.c b/Modules/_testinternalcapi.c index b8a22c439e85..088f0e46c6c6 100644 --- a/Modules/_testinternalcapi.c +++ b/Modules/_testinternalcapi.c @@ -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