GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — PyType_FromSpec wrong behavior with multiple Py_tp_members · Issue #80712 · python/cpython

PyType_FromSpec wrong behavior with multiple Py_tp_members #80712

New issue
Copy link
New issue
Copy link
Closed
Closed
PyType_FromSpec wrong behavior with multiple Py_tp_members#80712
Copy link

Description

eduardo-elizondo
mannequin
opened on Apr 4, 2019
Issue body actions
BPO 36531
Nosy @eduardo-elizondo, @iritkatriel
PRs
  • bpo-36531: Only count number of members once in PyType_FromSpec #12691
  • 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 2019-04-04.23:53:40.353>
    labels = []
    title = 'PyType_FromSpec wrong behavior with multiple Py_tp_members'
    updated_at = <Date 2020-10-16.22:20:42.440>
    user = 'https://github.com/eduardo-elizondo'

    bugs.python.org fields:

    activity = <Date 2020-10-16.22:20:42.440>
    actor = 'iritkatriel'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = []
    creation = <Date 2019-04-04.23:53:40.353>
    creator = 'eelizondo'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 36531
    keywords = ['patch']
    message_count = 2.0
    messages = ['339468', '378769']
    nosy_count = 2.0
    nosy_names = ['eelizondo', 'iritkatriel']
    pr_nums = ['12691']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue36531'
    versions = []

    Activity

    1. eduardo-elizondo commented on Apr 4, 2019

      @eduardo-elizondo
      eduardo-elizondomannequin
      on Apr 4, 2019
      MannequinAuthor
      More actions

      If a user accidentally defined more than one Py_tp_members in the spec, PyType_FromSpec will ignore all but the last use case. However, the number of members count will cause the type to allocate more memory than needed. This leads to weird behavior and crashes.

      The solution is a one line fix to just restart the count if multiple Py_tp_members are defined.

    2. iritkatriel commented on Oct 16, 2020

      @iritkatriel
      iritkatriel
      on Oct 16, 2020
      Member
      More actions

      Can this be closed? Or did you keep it open in order to add a unit test?

    3. ezio-melotti
      transferred this issue fromon Apr 10, 2022
    4. erlend-aasland
      added
      pendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is provided
      on May 20, 2022
    5. kumaraditya303 commented on Jun 19, 2022

      @kumaraditya303
      kumaraditya303
      on Jun 19, 2022
      Contributor
      More actions

      Fixed by #93471

    6. kumaraditya303
      closed this as completedon Jun 19, 2022
    7. AA-Turner
      removed
      pendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is provided
      on Jun 19, 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

      No labels
      No labels

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions

        You are visitor 01402503 — GeezerVison does not store the pages you look up.
        Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.