Assertion failure in Objects/unicodeobject.c `_PyUnicode_DecodeUnicodeEscapeInternal2: Assertion 'end - s <= writer.size - writer.pos' failed`
Đang mở
@serhiy-storchaka đang làm issue này rồi.
Từ ngày 10/11/2025.
interpreter-core
topic-unicode
type-crash
- Ngôn ngữ chính
- Python
- Star
- 77.2k
- Fork
- 35.9k
- Chỉ số merge pull request
- Chỉ số pull request đang chờ
Mô tả
Bug report
Bug description:
import codecs
decode = codecs.unicode_escape_decode
data = {b'\\x0': (b'\xe2\x98\x83', 0)}
def mutating(exc):
key = exc.object[:exc.end]
r = data.get(key)
if r is not None:
return ('Є', r[1])
codecs.register_error('test.mutating2', mutating)
input_obj = b'\\x0n\\z'
result, length = decode(input_obj, 'test.mutating2')
python: ../Objects/unicodeobject.c:6687: _PyUnicode_DecodeUnicodeEscapeInternal2: Assertion `end - s <= writer.size - writer.pos' failed.
Aborted (core dumped)
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
- gh-141344
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Đánh giá
Issue này chưa được đánh giá.