Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyType_FromModuleAndSpec function should add the process of tp_vectorcall_offset #84764

Closed
shihai1991 opened this issue May 10, 2020 · 5 comments
Labels
3.9 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs)

Comments

@shihai1991
Copy link
Member

BPO 40584
Nosy @vstinner, @encukou, @shihai1991
PRs
  • bpo-40584: Update PyType_FromModuleAndSpec to process tp_vectorcall_offset #20026
  • 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 2020-05-11.21:41:15.546>
    created_at = <Date 2020-05-10.17:07:23.615>
    labels = ['interpreter-core', '3.9']
    title = 'PyType_FromModuleAndSpec function should add the process of tp_vectorcall_offset'
    updated_at = <Date 2020-05-11.21:41:29.917>
    user = 'https://github.com/shihai1991'

    bugs.python.org fields:

    activity = <Date 2020-05-11.21:41:29.917>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-05-11.21:41:15.546>
    closer = 'vstinner'
    components = ['Interpreter Core']
    creation = <Date 2020-05-10.17:07:23.615>
    creator = 'shihai1991'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 40584
    keywords = ['patch']
    message_count = 5.0
    messages = ['368589', '368621', '368633', '368659', '368660']
    nosy_count = 3.0
    nosy_names = ['vstinner', 'petr.viktorin', 'shihai1991']
    pr_nums = ['20026']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'patch review'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue40584'
    versions = ['Python 3.9']

    @shihai1991
    Copy link
    Member Author

    some typeobject using tp_vectorcall_offset, if we use PyType_FromModuleAndSpec to create the the typeobject, it will be faild due to PyType_FromModuleAndSpec lack the process of tp_vectorcall_offset.

    so we should adding some process like https://github.com/python/cpython/blob/master/Objects/typeobject.c#L2966-L2976.

    @shihai1991 shihai1991 added 3.9 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) labels May 10, 2020
    @encukou
    Copy link
    Member

    encukou commented May 11, 2020

    That seems reasonable. See the discussion around https://bugs.python.org/issue38140 for context.

    Note that __dictoffset__ and __weaklistoffset__ are also exposed as members (in PyMemberDef type_members) and documented (Doc/c-api/structures.rst). A new __vectorcalloffset__ should have that as well.

    @shihai1991
    Copy link
    Member Author

    Note that __dictoffset__ and __weaklistoffset__ are also exposed as members (in PyMemberDef type_members) and documented (Doc/c-api/structures.rst). A new __vectorcalloffset__ should have that as well.

    Thanks for your comment, petr. And I updated the doc in PR20026.

    @vstinner
    Copy link
    Member

    New changeset 86d6944 by Hai Shi in branch 'master':
    bpo-40584: Update PyType_FromModuleAndSpec() to process tp_vectorcall_offset (GH-20026)
    86d6944

    @vstinner
    Copy link
    Member

    Thanks Hai Shi!

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.9 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs)
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants