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: non-ASCII bytes format raises UnicodeEncodeError instead of struct.error on 3.13/3.14 #158172
#153835 (backport of gh-85943) introduces a regression on 3.13 and 3.14. A bytes format with a non-ASCII byte now raises UnicodeEncodeError instead of struct.error:
>>>importstruct>>>struct.unpack(b'\xc5', b'')
UnicodeEncodeError: 'ascii'codeccan't encode character '\udcc5' inposition0: ordinalnotinrange(128)
3.14.0 raises struct.error: bad char in struct format. main is not affected since gh-145850 already rejects non-ASCII formats with ValueError.
UnicodeEncodeError: 'ascii' codec can't encode character '\udcc5' in position 0: ordinal not in range(128)
==75== ERROR: libFuzzer: deadly signal
#6 0x55d07f8c7884 in _run_fuzz /src/cpython3/Modules/_xxtestfuzz/fuzzer.c:575:9
#7 0x55d07f8c7884 in LLVMFuzzerTestOneInput /src/cpython3/Modules/_xxtestfuzz/fuzzer.c:640:11
Base64: xQA=
Activity
corona10 commentedon Sep 25, 2026
cc @serhiy-storchaka
StanFromIreland commentedon Sep 25, 2026
More generally, for CIFuzz things we have #152211.
Merge branch '3.14' into pythongh-158172-struct-bytes-error