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

Fatal Python error in socket.if_indextoname() #81194

Closed
ZackerySpytz mannequin opened this issue May 22, 2019 · 2 comments · Fixed by #112599, #112600 or #113474
Closed

Fatal Python error in socket.if_indextoname() #81194

ZackerySpytz mannequin opened this issue May 22, 2019 · 2 comments · Fixed by #112599, #112600 or #113474
Labels
3.8 (EOL) end of life 3.9 only security fixes 3.10 only security fixes 3.11 only security fixes extension-modules C modules in the Modules dir release-blocker type-crash A hard crash of the interpreter, possibly with a core dump

Comments

@ZackerySpytz
Copy link
Mannequin

ZackerySpytz mannequin commented May 22, 2019

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']

    @ZackerySpytz
    Copy link
    Mannequin Author

    ZackerySpytz mannequin commented May 22, 2019

    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.

    @ZackerySpytz ZackerySpytz mannequin added 3.7 (EOL) end of life 3.8 (EOL) end of life extension-modules C modules in the Modules dir type-crash A hard crash of the interpreter, possibly with a core dump labels May 22, 2019
    @iritkatriel iritkatriel added 3.9 only security fixes 3.10 only security fixes 3.11 only security fixes and removed 3.7 (EOL) end of life 3.8 (EOL) end of life labels Oct 17, 2021
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    @serhiy-storchaka
    Copy link
    Member

    All backports were merged.

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.8 (EOL) end of life 3.9 only security fixes 3.10 only security fixes 3.11 only security fixes extension-modules C modules in the Modules dir release-blocker type-crash A hard crash of the interpreter, possibly with a core dump
    Projects
    2 participants