You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PyCode_Addr2Location bogus assert(?) or invalid branch? #95060
Activity
Fidget-Spinner commentedon Jul 21, 2022
I think the branch is supposed to return
0or1. (Not sure which).markshannon commentedon Jul 21, 2022
There are no tests for
PyCode_Addr2Locationand it is undocumented. 🤷Returning 0 with an exception if
addrq < 0seems the better API, but at this stage in 3.11, returning 1 for success seems safer.markshannon commentedon Jul 21, 2022
Returning 1 seems consistent with the original implementation for #88116, so let's go with that.
[3.11] GH-95060: Fix PyCode_Addr2Location when addrq < 0 (GH-95094)