[issue34087] int(s), float(s) and others may cause segmentation fault

2018-07-14 Thread INADA Naoki
INADA Naoki added the comment: New changeset b2f8aa0c998d331ab2b4c701756a6427c0e91d48 by INADA Naoki in branch '3.6': bpo-34087: Backport tests for int/float/complex (GH-8274) https://github.com/python/cpython/commit/b2f8aa0c998d331ab2b4c701756a6427c0e91d48 -- _

[issue34087] int(s), float(s) and others may cause segmentation fault

2018-07-13 Thread INADA Naoki
Change by INADA Naoki : -- pull_requests: +7815 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue34087] int(s), float(s) and others may cause segmentation fault

2018-07-13 Thread INADA Naoki
Change by INADA Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 ___ Python tracker ___ ___

[issue34087] int(s), float(s) and others may cause segmentation fault

2018-07-13 Thread miss-islington
miss-islington added the comment: New changeset c721472fb83d1f7c7606bcf33ba2d42d6127a764 by Miss Islington (bot) in branch '3.7': bpo-34087: Fix buffer overflow in int(s) and similar functions (GH-8274) https://github.com/python/cpython/commit/c721472fb83d1f7c7606bcf33ba2d42d6127a764 --

[issue34087] int(s), float(s) and others may cause segmentation fault

2018-07-13 Thread miss-islington
Change by miss-islington : -- pull_requests: +7814 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue34087] int(s), float(s) and others may cause segmentation fault

2018-07-13 Thread INADA Naoki
INADA Naoki added the comment: New changeset 16dfca4d829e45f36e71bf43f83226659ce49315 by INADA Naoki in branch 'master': bpo-34087: Fix buffer overflow in int(s) and similar functions (GH-8274) https://github.com/python/cpython/commit/16dfca4d829e45f36e71bf43f83226659ce49315 -- ___

[issue34087] int(s), float(s) and others may cause segmentation fault

2018-07-13 Thread Ezio Melotti
Change by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue34087] int(s), float(s) and others may cause segmentation fault

2018-07-13 Thread INADA Naoki
INADA Naoki added the comment: When I commented out the fix: $ ./python -c 'int("こんにちは")' python: Objects/unicodeobject.c:484: _PyUnicode_CheckConsistency: Assertion `PyUnicode_READ(kind, data, ascii->length) == 0' failed. Aborted I added this to test cases. -- _

[issue34087] int(s), float(s) and others may cause segmentation fault

2018-07-13 Thread Jonas H.
Jonas H. added the comment: The assertion in the patched code, yes. The segfault in the unpatched code, no. -- ___ Python tracker ___ _

[issue34087] int(s), float(s) and others may cause segmentation fault

2018-07-13 Thread STINNER Victor
STINNER Victor added the comment: > I don't think this can be tested with Python code, unless you can make sure > the target buffer _PyUnicode_TransformDecimalAndSpaceToASCII operates on is > initialised with garbage bytes. We just have to call float() with a non-ASCII string, no? An asserti

[issue34087] int(s), float(s) and others may cause segmentation fault

2018-07-13 Thread Jonas H.
Jonas H. added the comment: I don't think this can be tested with Python code, unless you can make sure the target buffer _PyUnicode_TransformDecimalAndSpaceToASCII operates on is initialised with garbage bytes. -- ___ Python tracker

[issue34087] int(s), float(s) and others may cause segmentation fault

2018-07-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Is it possible to write a reproducer in Python? The string returned by _PyUnicode_TransformDecimalAndSpaceToASCII() is still a NUL-terminated, but the NUL can be far past the end of the string. -- nosy: +serhiy.storchaka __

[issue34087] int(s), float(s) and others may cause segmentation fault

2018-07-13 Thread INADA Naoki
Change by INADA Naoki : -- keywords: +patch pull_requests: +7809 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue34087] int(s), float(s) and others may cause segmentation fault

2018-07-13 Thread INADA Naoki
Change by INADA Naoki : -- title: float(unicode) may cause segmentation fault -> int(s), float(s) and others may cause segmentation fault ___ Python tracker ___ __