New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash when RawIOBase.write(b) evaluates b.format #71382
Comments
$ gdb --args ./python -c '
import io
class R(io.RawIOBase):
def writable(self): return True
def write(self, b):
print("About to evaluate {!r}.format".format(b))
b.format
print("Never reached")
b = io.BufferedWriter(R())
b.write(b"x")
b.flush()
'
[. . .]
(gdb) run
[. . .]
About to evaluate <memory at 0x7ffff6ee4380>.format
python: Objects/stringobject.c:120: PyString_FromString: Assertion `str != NULL' failed. Program received signal SIGABRT, Aborted. |
Ping. |
PyBUF_RECORDS pulls in PyBUF_STRIDES, which should IMO not be done in a stable release. Maybe (PyBUF_CONTIG_RO|PyBUF_FORMAT), but I'm uneasy even about that. The potential for breakage is huge. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: