Skip to content

Mismatched C function signature in _xxsubinterpreters.channel_close() #77635

Closed

Description

@serhiy-storchaka
BPO 33454
Nosy @ericsnowcurrently, @serhiy-storchaka, @siddhesh
PRs
  • bpo-33454: Fix arguments parsing in _xxsubinterpreters.channel_close(). #6747
  • 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 2018-05-23.05:17:46.943>
    created_at = <Date 2018-05-10.10:17:56.494>
    labels = ['extension-modules', 'type-bug', '3.8']
    title = 'Mismatched C function signature in _xxsubinterpreters.channel_close()'
    updated_at = <Date 2018-05-23.05:17:46.941>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2018-05-23.05:17:46.941>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = True
    closed_date = <Date 2018-05-23.05:17:46.943>
    closer = 'serhiy.storchaka'
    components = ['Extension Modules']
    creation = <Date 2018-05-10.10:17:56.494>
    creator = 'serhiy.storchaka'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 33454
    keywords = ['patch']
    message_count = 3.0
    messages = ['316354', '316734', '316742']
    nosy_count = 3.0
    nosy_names = ['eric.snow', 'serhiy.storchaka', 'siddhesh']
    pr_nums = ['6747']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue33454'
    versions = ['Python 3.8']

    Activity

    1. serhiy-storchaka commented on May 10, 2018

      @serhiy-storchaka
      MemberAuthor

      The C function that implements _xxsubinterpreters.channel_close() is defined with the signature

      PyObject *channel_close(PyObject *self, PyObject *args, PyObject *kwds)
      

      which corresponds the method convention METH_VARARGS | METH_KEYWORDS, but is used with the incompatible method convention METH_VARARGS. Either the signature or flags are not correct.

      Actually it can use just METH_O. The proposed PR changes both signature and flags and simplifies the implementation.

      The bug was found thanks to gcc 8 emitting a warning for invalid function cast (it also emits a lot of false alarms). See also bpo-33012.

    2. ericsnowcurrently commented on May 15, 2018

      @ericsnowcurrently
      Member

      Thanks for catching this, Serhiy! I've approved the PR.

    3. serhiy-storchaka commented on May 15, 2018

      @serhiy-storchaka
      MemberAuthor

      New changeset d8dcd57 by Serhiy Storchaka in branch 'master':
      bpo-33454: Fix arguments parsing in _xxsubinterpreters.channel_close(). (GH-6747)
      d8dcd57

    4. 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

      3.8 (EOL)end of lifeextension-modulesC modules in the Modules dirtype-bugAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions