You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
struct.Struct.iter_unpack crashes when __buffer__ reinitializes the Struct to a zero-sized format #158695
Documented behaviour: The struct documentation, under struct.iter_unpack, states: “The buffer’s size in bytes must be a multiple of the size required by the format.” A zero-sized format cannot define the fixed-size chunks described there: “This function returns an iterator which will read equally-sized chunks from the buffer until all its contents have been consumed.”
Expected: Raise struct.error after detecting the zero-sized format, without crashing.
Actual: The subprocess exits with status 3221225620 (0xC0000094, integer division by zero).
Activity
Link struct-20261003-232219-c4 to python/cpython#158695
ZeroIntensity commentedon Oct 4, 2026
See #158748 (comment).