Skip to content
Snippets Groups Projects
Unverified Commit e693f84c authored by Miss Islington (bot)'s avatar Miss Islington (bot) Committed by GitHub
Browse files

[3.11] GH-95060: Fix PyCode_Addr2Location when addrq < 0 (GH-95094)




(cherry picked from commit a6daaf2a)


Co-authored-by: default avatarKen Jin <28750310+Fidget-Spinner@users.noreply.github.com>
parent d19b5d85
Branches
Tags
No related merge requests found
Undocumented ``PyCode_Addr2Location`` function now properly returns when
``addrq`` argument is less than zero.
......@@ -969,6 +969,7 @@ PyCode_Addr2Location(PyCodeObject *co, int addrq,
if (addrq < 0) {
*start_line = *end_line = co->co_firstlineno;
*start_column = *end_column = 0;
return 1;
}
assert(addrq >= 0 && addrq < _PyCode_NBYTES(co));
PyCodeAddressRange bounds;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment