Skip to content

_io.BytesIO.getbuffer(): unshare_buffer: Assertion `self->exports == 0' failed #111174

Closed
@chgnrdv

Description

@chgnrdv

Crash report

What happened?

import io
f = io.BytesIO()
a = f.getbuffer()
b = f.getbuffer()

Output:

python: ./Modules/_io/bytesio.c:112: unshare_buffer: Assertion `self->exports == 0' failed.
Aborted (core dumped)

Reproduced on 3.8 and 3.11-3.13.

CPython versions tested on:

3.8, 3.11, 3.12, CPython main branch

Operating systems tested on:

Linux

Output from running 'python -VV' on the command line:

Python 3.13.0a1+ (heads/main:11312eae6e, Oct 22 2023, 02:44:38) [GCC 10.2.1 20210110]

Linked PRs

Metadata

Metadata

Labels

topic-IOtype-crashA hard crash of the interpreter, possibly with a core dump

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions