From 25d2819963825b6448f6e8fb79f2009df64ff8b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Langa?= Date: Wed, 22 Jan 2025 18:19:19 +0100 Subject: [PATCH] GH-91048: Don't attempt to run on FreeBSD --- Modules/_testexternalinspection.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Modules/_testexternalinspection.c b/Modules/_testexternalinspection.c index 0c31d1b7a3486c..25e0e9c64ec27d 100644 --- a/Modules/_testexternalinspection.c +++ b/Modules/_testexternalinspection.c @@ -263,9 +263,7 @@ search_map_for_section(pid_t pid, const char* secname, const char* substr) { return 0; } -#endif - -#ifdef __linux__ +#elif defined(__linux__) static uintptr_t find_map_start_address(pid_t pid, char* result_filename, const char* map) { @@ -395,7 +393,12 @@ search_map_for_section(pid_t pid, const char* secname, const char* map) } return result; } - +#else +static uintptr_t +search_map_for_section(pid_t pid, const char* secname, const char* map) +{ + return 0; +} #endif static uintptr_t @@ -1265,7 +1268,6 @@ read_offsets( _Py_DebugOffsets* debug_offsets ) { *runtime_start_address = get_py_runtime(pid); - assert(runtime_start_address != NULL); if ((void*)*runtime_start_address == NULL) { if (!PyErr_Occurred()) { PyErr_SetString(