diff --git a/Modules/_testinternalcapi.c b/Modules/_testinternalcapi.c index b8a22c439e853d..088f0e46c6c658 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