Skip to content

Fatal Python error in socket.if_indextoname() #81194

Closed

Description

@ZackerySpytz
BPO 37013
Nosy @vstinner, @serhiy-storchaka, @ZackerySpytz
PRs
  • bpo-37013: Fix the error handling in socket.if_indextoname() #13503
  • 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-05-22.16:28:25.862>
    labels = ['extension-modules', '3.10', '3.9', 'type-crash', '3.11']
    title = 'Fatal Python error in socket.if_indextoname()'
    updated_at = <Date 2021-10-17.22:13:16.533>
    user = 'https://github.com/ZackerySpytz'

    bugs.python.org fields:

    activity = <Date 2021-10-17.22:13:16.533>
    actor = 'iritkatriel'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Extension Modules']
    creation = <Date 2019-05-22.16:28:25.862>
    creator = 'ZackerySpytz'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 37013
    keywords = ['patch']
    message_count = 1.0
    messages = ['343215']
    nosy_count = 3.0
    nosy_names = ['vstinner', 'serhiy.storchaka', 'ZackerySpytz']
    pr_nums = ['13503']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'crash'
    url = 'https://bugs.python.org/issue37013'
    versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

    Activity

    1. ZackerySpytz commented on May 22, 2019

      ZackerySpytzmannequin
      MannequinAuthor
      Python 3.8.0a4+ (heads/master:ef9d9b6312, May 22 2019, 08:35:25) 
      [GCC 9.0.1 20190402 (experimental) [trunk revision 270074]] on linux
      Type "help", "copyright", "credits" or "license" for more information.
      >>> import socket
      >>> socket.if_indextoname(2**64 - 1)
      Fatal Python error: a function returned NULL without setting an error
      SystemError: <built-in function if_indextoname> returned NULL without setting an error

      Current thread 0x00007f29d708d140 (most recent call first):
      File "<stdin>", line 1 in <module>
      Aborted (core dumped)

      This is because socket.if_indextoname() does not use PyErr_Occurred() when checking PyLong_AsUnsignedLong() for failure.

    2. added
      3.7 (EOL)
      3.8 (EOL)
      extension-modules
      type-crash
      on May 22, 2019
    3. added
      3.9 (EOL)
      3.10 (EOL)
      3.11
      and removed
      3.7 (EOL)
      3.8 (EOL)
      on Oct 17, 2021
    4. transferred this issue fromon Apr 10, 2022
    5. serhiy-storchaka commented on Feb 5, 2024

      @serhiy-storchaka
      Member

      All backports were merged.

    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.10 (EOL)3.113.8 (EOL)3.9 (EOL)extension-modulesrelease-blockertype-crash

      Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions