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
PyTuple_SET_ITEM could check bounds in debug mode #58819
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2019-01-11.10:52:42.001>created_at=<Date2012-04-18.15:03:33.645>labels= ['interpreter-core', 'type-feature']
title='PyTuple_SET_ITEM could check bounds in debug mode'updated_at=<Date2019-01-11.10:52:42.000>user='https://github.com/pitrou'
Should we limit ourselves to bound errors? Couldn't we make the macros aliases for their full-fledged function equivalents (e.g. PyTuple_SetItem()) which trigger Py_FatalError() on error so we also get argument type checking?
Oh, I didn't know this old issue (6 years old). I wrote an implementation of this issue for PyTuple_GET_ITEM/SET_ITEM: bpo-35337. Would you mind to have a look? It seems to be backward incompatible when these macros are misused on structseq.
Activity
pitrou commentedon Apr 18, 2012
Which it doesn't, as exemplified in e8c87226bcb3 :-)
benjaminp commentedon Apr 18, 2012
Also, PyList_SET_ITEM and friends.
brettcannon commentedon Apr 19, 2012
Should we limit ourselves to bound errors? Couldn't we make the macros aliases for their full-fledged function equivalents (e.g. PyTuple_SetItem()) which trigger Py_FatalError() on error so we also get argument type checking?
vstinner commentedon Nov 29, 2018
Oh, I didn't know this old issue (6 years old). I wrote an implementation of this issue for PyTuple_GET_ITEM/SET_ITEM: bpo-35337. Would you mind to have a look? It seems to be backward incompatible when these macros are misused on structseq.
vstinner commentedon Jan 11, 2019
Since bpo-35337 has been rejected, I also close this issue.