-
-
Notifications
You must be signed in to change notification settings - Fork 34.5k
Assertion failure from StringIO.__setstate__ #127182
Copy link
Copy link
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 dirtype-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump
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 dirtype-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump
Crash report
What happened?
It's possible to abort the interpreter by calling
StringIO.__setstate__with a non-stringinitial_value:Interestingly, on a non-debug build passing an int as
initial_valuegives an error message saying thatNoneshould be a valid value:Found using fusil by @vstinner.
CPython versions tested on:
3.13, 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
io.StringIO.__setstate__crash whenNoneis the first value #127219io.StringIO.__setstate__crash whenNoneis the first value (GH-127219) #127262io.StringIO.__setstate__crash whenNoneis the first value (GH-127219) #127263