Open devdanzin opened 1 week ago
Calling bytes_object.__buffer__(large_negative_number) in a debug build aborts with this message:
bytes_object.__buffer__(large_negative_number)
>>> b"".__buffer__(-2**31 - 1) python: Objects/typeobject.c:9321: wrap_buffer: Assertion `_Py_STATIC_CAST(Py_ssize_t, _Py_STATIC_CAST(int, (flags))) == (flags)' failed. Aborted
Found using fusil by @vstinner.
CPython main branch
Linux, Windows
Python 3.14.0a1+ (heads/main:4ea214ea982, Nov 6 2024, 00:52:15) [MSC v.1941 64 bit (AMD64)]
I wrote PR gh-126754 to fix the issue.
Crash report
What happened?
Calling
bytes_object.__buffer__(large_negative_number)
in a debug build aborts with this message:Found using fusil by @vstinner.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux, Windows
Output from running 'python -VV' on the command line:
Python 3.14.0a1+ (heads/main:4ea214ea982, Nov 6 2024, 00:52:15) [MSC v.1941 64 bit (AMD64)]
Linked PRs