[issue31626] Crash in _PyUnicode_DecodeUnicodeEscape on OpenBSD

2017-10-01 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +3825 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-

[issue31626] Crash in _PyUnicode_DecodeUnicodeEscape on OpenBSD

2017-10-01 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- priority: normal -> critical ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue31626] Crash in _PyUnicode_DecodeUnicodeEscape on OpenBSD

2017-10-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There several bugs in the memory allocator. Incorrectly detected the case when realloc() resizes a memory block in-place. Wrong address is used for filling the extra memory with DEADBYTE. -if (q == oldq && nbytes < original_nbytes) { +if (q == oldq

[issue31626] Crash in _PyUnicode_DecodeUnicodeEscape on OpenBSD

2017-09-29 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +davin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue31626] Crash in _PyUnicode_DecodeUnicodeEscape on OpenBSD

2017-09-29 Thread STINNER Victor
STINNER Victor added the comment: "_PyUnicodeWriter_Finish() calls resize_compact() for truncating the result, but the latter fills the last 15 bytes with \xdb. Since the string is tagged as ASCII, thus crashing in _PyUnicode_CheckConsistency." Cool. My code works as expected to catch bugs :-

[issue31626] Crash in _PyUnicode_DecodeUnicodeEscape on OpenBSD

2017-09-28 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- type: -> crash ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue31626] Crash in _PyUnicode_DecodeUnicodeEscape on OpenBSD

2017-09-28 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : I tried to build CPython on 64-bit OpenBSD. It was built successfully, but tests crash. They crash on importing hashlib. Actually on compiling hashlib docstring. Minimal reproducer is: $ ./python -c 'import codecs; codecs.decode(r"\\"*15 + "x"*1906, "uni