-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
SystemError/Assertion failure when processing struct with '0p' field #124248
Labels
extension-modules
C modules in the Modules dir
type-crash
A hard crash of the interpreter, possibly with a core dump
Comments
brianschubert
added
the
type-crash
A hard crash of the interpreter, possibly with a core dump
label
Sep 19, 2024
vstinner
pushed a commit
that referenced
this issue
Sep 20, 2024
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Sep 20, 2024
…nGH-124251) (cherry picked from commit 63f1960) Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Sep 20, 2024
…nGH-124251) (cherry picked from commit 63f1960) Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
Fixed by change 63f1960. |
vstinner
pushed a commit
that referenced
this issue
Sep 20, 2024
savannahostrowski
pushed a commit
to savannahostrowski/cpython
that referenced
this issue
Sep 22, 2024
savannahostrowski
pushed a commit
to savannahostrowski/cpython
that referenced
this issue
Sep 22, 2024
Yhg1s
pushed a commit
that referenced
this issue
Sep 30, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
extension-modules
C modules in the Modules dir
type-crash
A hard crash of the interpreter, possibly with a core dump
Crash report
What happened?
Using
struct
to process zero-width Pascal strings ("0p"
) can lead to an assertion failure orSystemError
.Specifically:
struct.pack("<0p", b"")
leads to an assertion failure and seg fault on debug builds (tested with currentmain
and 3.13 tip)struct.unpack("<0p", b"")
raises an unexpectedSystemError
(tested with currentmain
, 3.13 tip, non-debug builds of 3.8-3.12)On current
main
(8f82d9aa219
):The same behavior is reproducible on the current 3.13 tip (
112b1704fa6
), and likely previous versions.PR forthcoming.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Output from running 'python -VV' on the command line:
Python 3.14.0a0 (heads/main:8f82d9aa219, Sep 19 2024, 11:08:04) [GCC 11.4.0]
Linked PRs
The text was updated successfully, but these errors were encountered: