Skip to content

Commit 23fdc5f

Browse files
Set exception in read_memory if not supported on the platform
1 parent 1b27f36 commit 23fdc5f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Modules/_testexternalinspection.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,9 @@ read_memory(pid_t pid, uintptr_t remote_address, size_t len, void* dst)
481481
}
482482
total_bytes_read = len;
483483
#else
484+
PyErr_SetString(
485+
PyExc_RuntimeError,
486+
"Memory reading is not supported on this platform");
484487
return -1;
485488
#endif
486489
return total_bytes_read;

0 commit comments

Comments
 (0)