-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed
Labels
3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixesextension-modulesC modules in the Modules dirC modules in the Modules dirtopic-subinterpreterstype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
It's possible to make a debug build of Python abort by passing an invalid Unicode argument to _interpreters.create()
, resulting in SystemError: <built-in function create> returned a result with an exception set
.
$ ./python -c "import _interpreters; _interpreters.create('\udc80')"
Fatal Python error: _Py_CheckFunctionResult: a function returned a result with an exception set
Python runtime state: initialized
UnicodeEncodeError: 'utf-8' codec can't encode character '\udc80' in position 0: surrogates not allowed
The above exception was the direct cause of the following exception:
SystemError: <built-in function create> returned a result with an exception set
Current thread 0x00007f0234dca740 (most recent call first):
File "<string>", line 1 in <module>
Aborted
Found using fusil by @vstinner.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux, Windows
Linked PRs
Metadata
Metadata
Assignees
Labels
3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixesextension-modulesC modules in the Modules dirC modules in the Modules dirtopic-subinterpreterstype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Projects
Status
Done