Skip to content

Commit 25d2819

Browse files
committed
GH-91048: Don't attempt to run on FreeBSD
1 parent 1885988 commit 25d2819

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Modules/_testexternalinspection.c

+7-5
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,7 @@ search_map_for_section(pid_t pid, const char* secname, const char* substr) {
263263
return 0;
264264
}
265265

266-
#endif
267-
268-
#ifdef __linux__
266+
#elif defined(__linux__)
269267
static uintptr_t
270268
find_map_start_address(pid_t pid, char* result_filename, const char* map)
271269
{
@@ -395,7 +393,12 @@ search_map_for_section(pid_t pid, const char* secname, const char* map)
395393
}
396394
return result;
397395
}
398-
396+
#else
397+
static uintptr_t
398+
search_map_for_section(pid_t pid, const char* secname, const char* map)
399+
{
400+
return 0;
401+
}
399402
#endif
400403

401404
static uintptr_t
@@ -1265,7 +1268,6 @@ read_offsets(
12651268
_Py_DebugOffsets* debug_offsets
12661269
) {
12671270
*runtime_start_address = get_py_runtime(pid);
1268-
assert(runtime_start_address != NULL);
12691271
if ((void*)*runtime_start_address == NULL) {
12701272
if (!PyErr_Occurred()) {
12711273
PyErr_SetString(

0 commit comments

Comments
 (0)