https://github.com/python/cpython/commit/be98fda7c6698e8468afd528c864aca1f532af59
commit: be98fda7c6698e8468afd528c864aca1f532af59
branch: main
author: Victor Stinner <[email protected]>
committer: ambv <[email protected]>
date: 2025-01-25T18:19:48+01:00
summary:
gh-129223: Raise KeyError in search_map_for_section() if not found (#129262)
files:
M Modules/_testexternalinspection.c
diff --git a/Modules/_testexternalinspection.c
b/Modules/_testexternalinspection.c
index 24adb63cbed24c..5a28c0e266226b 100644
--- a/Modules/_testexternalinspection.c
+++ b/Modules/_testexternalinspection.c
@@ -383,6 +383,10 @@ search_map_for_section(pid_t pid, const char* secname,
const char* map)
);
result = start_address + (uintptr_t)section->sh_addr - elf_load_addr;
}
+ else {
+ PyErr_Format(PyExc_KeyError,
+ "cannot find map for section %s", secname);
+ }
exit:
if (close(fd) != 0) {
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]