Skip to content

PyTuple_SET_ITEM could check bounds in debug mode #58819

Closed

Description

@pitrou
BPO 14614
Nosy @brettcannon, @ncoghlan, @pitrou, @vstinner, @benjaminp

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 = None
closed_at = <Date 2019-01-11.10:52:42.001>
created_at = <Date 2012-04-18.15:03:33.645>
labels = ['interpreter-core', 'type-feature']
title = 'PyTuple_SET_ITEM could check bounds in debug mode'
updated_at = <Date 2019-01-11.10:52:42.000>
user = 'https://github.com/pitrou'

bugs.python.org fields:

activity = <Date 2019-01-11.10:52:42.000>
actor = 'vstinner'
assignee = 'none'
closed = True
closed_date = <Date 2019-01-11.10:52:42.001>
closer = 'vstinner'
components = ['Interpreter Core']
creation = <Date 2012-04-18.15:03:33.645>
creator = 'pitrou'
dependencies = []
files = []
hgrepos = []
issue_num = 14614
keywords = []
message_count = 5.0
messages = ['158632', '158633', '158731', '330642', '333454']
nosy_count = 6.0
nosy_names = ['brett.cannon', 'ncoghlan', 'pitrou', 'vstinner', 'benjamin.peterson', 'Arfrever']
pr_nums = []
priority = 'low'
resolution = 'wont fix'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue14614'
versions = ['Python 3.3']

Activity

  1. pitrou commented on Apr 18, 2012

    @pitrou
    MemberAuthor

    Which it doesn't, as exemplified in e8c87226bcb3 :-)

  2. added
    interpreter-core(Objects, Python, Grammar, and Parser dirs)
    type-featureA feature request or enhancement
    on Apr 18, 2012
  3. benjaminp commented on Apr 18, 2012

    @benjaminp
    Contributor

    Also, PyList_SET_ITEM and friends.

  4. brettcannon commented on Apr 19, 2012

    @brettcannon
    Member

    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?

  5. vstinner commented on Nov 29, 2018

    @vstinner
    Member

    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.

  6. vstinner commented on Jan 11, 2019

    @vstinner
    Member

    Since bpo-35337 has been rejected, I also close this issue.

  7. transferred this issue fromon Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions