mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
gh-129223: Raise KeyError in search_map_for_section() if not found (#129262)
This commit is contained in:
parent
7a54a653b7
commit
be98fda7c6
1 changed files with 4 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue