Crash in garbage collection of the io.BytesIO buffer object #111211
Labels
3.12
only security fixes
3.13
bugs and security fixes
type-crash
A hard crash of the interpreter, possibly with a core dump
Crash report
What happened?
If the buffer created by io.BytesIO.getbuffer() is a part of a reference loop, the garbage collector can crash. Reproducer:
It is because
bytesiobuf_clear()
clearsself->source
, butbytesiobuf_releasebuffer()
uses it.bytesiobuf_clear()
was added in #101819.CPython versions tested on:
3.12, CPython main branch
Operating systems tested on:
No response
Output from running 'python -VV' on the command line:
No response
The text was updated successfully, but these errors were encountered: