Open devdanzin opened 4 days ago
I'm assuming this is because of a missing NULL
check on PyUnicode_AsUTF8
again. Should be a pretty easy fix, I'll deal with it if nobody else submits a PR.
I'm assuming this is because of a missing
NULL
check onPyUnicode_AsUTF8
again. Should be a pretty easy fix, I'll deal with it if nobody else submits a PR.
If you can, give it to me :)
Apparently, this is because PyUnicode_AsUTF8
doesn't do anything about embedded null characters, so some things in the dictionary lookups break down when converting from C to Python strings.
Crash report
What happened?
It's possible to segfault the interpreter by calling
initialize()
on aconcurrent.futures.interpreter.WorkerContext
instance that was created with theshared
argument being a dict containing the null byte as a key:This doesn't require threads or free-threading. It can be traced to the
_interpreters
module:The backtrace is:
Found using fusil by @vstinner.
CPython versions tested on:
3.14, CPython main branch
Operating systems tested on:
Linux
Output from running 'python -VV' on the command line:
Python 3.14.0a2+ (heads/main:0af4ec3, Nov 20 2024, 21:45:19) [GCC 13.2.0]
Linked PRs