This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Fatal Python error in socket.if_indextoname()
Type: crash Stage: patch review
Components: Extension Modules Versions: Python 3.11, Python 3.10, Python 3.9
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: ZackerySpytz, serhiy.storchaka, vstinner
Priority: normal Keywords: patch

Created on 2019-05-22 16:28 by ZackerySpytz, last changed 2022-04-11 14:59 by admin.

Pull Requests
URL Status Linked Edit
PR 13503 open ZackerySpytz, 2019-05-22 16:30
Messages (1)
msg343215 - (view) Author: Zackery Spytz (ZackerySpytz) * (Python triager) Date: 2019-05-22 16:28
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.
History
Date User Action Args
2022-04-11 14:59:15adminsetgithub: 81194
2021-10-17 22:13:16iritkatrielsetversions: + Python 3.9, Python 3.10, Python 3.11, - Python 3.7, Python 3.8
2019-05-22 16:30:47ZackerySpytzsetkeywords: + patch
stage: patch review
pull_requests: + pull_request13418
2019-05-22 16:28:25ZackerySpytzcreate