Skip to content

Check that new heap types cannot be created uninitialised: add Py_TPFLAGS_DISALLOW_INSTANTIATION type flag #88082

Closed
@pablogsal

Description

@pablogsal
BPO 43916
Nosy @vstinner, @tiran, @serhiy-storchaka, @pablogsal, @miss-islington, @erlend-aasland, @shreyanavigyan
PRs
  • bpo-43916: Add _PyType_DisabledNew to prevent new heap types from being created uninitialised #25653
  • bpo-43916: Add Py_TPFLAGS_DISALLOW_INSTANTIATION type flag #25721
  • bpo-43916: Use Py_TPFLAGS_DISABLE_NEW flag in hashlib #25722
  • [WIP] bpo-43916: PyType_FromSpec() supports Py_tp_new=NULL slot #25733
  • bpo-43916: Remove _disabled_new() function #25745
  • bpo-43916: Apply Py_TPFLAGS_DISALLOW_INSTANTIATION to selected types #25748
  • bpo-43916: PyStdPrinter_Type uses Py_TPFLAGS_DISALLOW_INSTANTIATION #25749
  • bpo-43916: Select now uses Py_TPFLAGS_DISALLOW_INSTANTIATION #25750
  • bpo-43916: select.devpoll uses Py_TPFLAGS_DISALLOW_INSTANTIATION #25751
  • bpo-43916: _md5.md5 uses Py_TPFLAGS_DISALLOW_INSTANTIATION #25753
  • bpo-43916: Export the _PyStructSequence_InitType to fix build errors in the curses module #25768
  • bpo-43916: Rewrite new hashlib tests, fix typo (GH-25791) #25791
  • bpo-43916: Move the _PyStructSequence_InitType function to the internal API #25854
  • bpo-43916: Use test.support.check_disallow_instantiation in test_tcl #26412
  • [3.10] bpo-43916: Use test.support.check_disallow_instantiation() in test_tcl (GH-26412) #26888
  • Files
  • patch.diff
  • disablednew.diff
  • 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 = None
    created_at = <Date 2021-04-22.21:31:58.958>
    labels = ['expert-C-API', 'type-bug', '3.9']
    title = 'Check that new heap types cannot be created uninitialised: add Py_TPFLAGS_DISALLOW_INSTANTIATION type flag'
    updated_at = <Date 2022-01-27.13:51:31.586>
    user = 'https://github.com/pablogsal'

    bugs.python.org fields:

    activity = <Date 2022-01-27.13:51:31.586>
    actor = 'vstinner'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['C API']
    creation = <Date 2021-04-22.21:31:58.958>
    creator = 'pablogsal'
    dependencies = []
    files = ['49989', '49992']
    hgrepos = []
    issue_num = 43916
    keywords = ['patch']
    message_count = 72.0
    messages = ['391634', '391635', '391903', '391905', '391909', '391910', '391911', '391912', '391913', '391917', '391924', '391925', '391926', '391928', '391929', '391931', '391934', '391936', '391937', '391984', '391992', '391999', '392036', '392040', '392042', '392044', '392046', '392048', '392057', '392169', '392170', '392297', '392414', '392426', '392427', '392433', '392434', '392435', '392437', '392438', '392451', '392456', '392462', '392464', '392465', '392472', '392473', '392526', '392528', '392534', '392537', '392545', '392546', '392553', '392554', '392556', '392558', '392570', '392621', '392632', '392635', '392811', '394571', '394582', '394603', '396200', '396476', '411785', '411786', '411865', '411867', '411874']
    nosy_count = 7.0
    nosy_names = ['vstinner', 'christian.heimes', 'serhiy.storchaka', 'pablogsal', 'miss-islington', 'erlendaasland', 'shreyanavigyan']
    pr_nums = ['25653', '25721', '25722', '25733', '25745', '25748', '25749', '25750', '25751', '25753', '25768', '25791', '25854', '26412', '26888']
    priority = None
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue43916'
    versions = ['Python 3.9']

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.9only security fixestopic-C-APItype-bugAn unexpected behavior, bug, or error

      Projects

      No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions