classification
Title: PyTuple_SET_ITEM could check bounds in debug mode
Type: enhancement Stage: resolved
Components: Interpreter Core Versions: Python 3.3
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: Arfrever, benjamin.peterson, brett.cannon, ncoghlan, pitrou, vstinner
Priority: low Keywords:

Created on 2012-04-18 15:03 by pitrou, last changed 2019-01-11 10:52 by vstinner. This issue is now closed.

Messages (5)
msg158632 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-04-18 15:03
Which it doesn't, as exemplified in e8c87226bcb3 :-)
msg158633 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2012-04-18 15:23
Also, PyList_SET_ITEM and friends.
msg158731 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2012-04-19 14:19
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?
msg330642 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-11-29 00:23
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.
msg333454 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-01-11 10:52
Since bpo-35337 has been rejected, I also close this issue.
History
Date User Action Args
2019-01-11 10:52:42vstinnersetstatus: open -> closed
resolution: wont fix
messages: + msg333454

stage: resolved
2018-11-29 00:23:46vstinnersetnosy: + vstinner
messages: + msg330642
2012-04-20 06:40:35Arfreversetnosy: + Arfrever
2012-04-19 14:19:07brett.cannonsetnosy: + brett.cannon
messages: + msg158731
2012-04-18 15:23:10benjamin.petersonsetmessages: + msg158633
2012-04-18 15:03:33pitroucreate