Skip to content

Commit 06e7180

Browse files
committed
gh-149879: Fix test_c_stack_unwind on Cygwin
On Cygwin, the Python library is called "cygpython3.16.dll".
1 parent ba0aca3 commit 06e7180

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

Modules/_testinternalcapi.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,10 +240,17 @@ classify_address(uintptr_t addr, int jit_enabled, PyInterpreterState *interp)
240240
if (strncmp(base, "python", 6) == 0) {
241241
return "python";
242242
}
243+
#ifdef __CYGWIN__
244+
// Match Cygwin "cygpython3.16.dll"
245+
if (strncmp(base, "cygpython", 9) == 0) {
246+
return "python";
247+
}
248+
#else
243249
// Match "libpython3.15.so.1.0"
244250
if (strncmp(base, "libpython", 9) == 0) {
245251
return "python";
246252
}
253+
#endif
247254
return "other";
248255
}
249256
#ifdef _Py_JIT

0 commit comments

Comments
 (0)