[issue14212] Segfault when using re.finditer over mmap
Matthew Barnett pyt...@mrabarnett.plus.com added the comment: In the function getstring in _sre.c, the code obtains a pointer to the characters of the buffer and then releases the buffer. There's a comment before the release: /* Release the buffer immediately --- possibly dangerous but doing something else would require some re-factoring */ PyBuffer_Release(view); What's happening is that after the mmap is closed the pointer is no longer valid. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14212 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14212] Segfault when using re.finditer over mmap
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14212 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14212] Segfault when using re.finditer over mmap
Changes by Stefan Krah stefan-use...@bytereef.org: -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14212 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14212] Segfault when using re.finditer over mmap
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 10a79a33d09b by Benjamin Peterson in branch '3.2': keep the buffer object around while we're using it (closes #14212) http://hg.python.org/cpython/rev/10a79a33d09b New changeset 17dfe24e5107 by Benjamin Peterson in branch 'default': merge 3.2 (#14212) http://hg.python.org/cpython/rev/17dfe24e5107 -- nosy: +python-dev resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14212 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14212] Segfault when using re.finditer over mmap
Benjamin Peterson benja...@python.org added the comment: I think 2.7 might be hopeless. -- nosy: +benjamin.peterson resolution: fixed - stage: committed/rejected - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14212 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14212] Segfault when using re.finditer over mmap
Changes by Benjamin Peterson benja...@python.org: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14212 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14212] Segfault when using re.finditer over mmap
New submission from Maciej Fijalkowski fij...@gmail.com: Example to get a segfault attached. Crashes under python3 as well. -- files: x.py messages: 155028 nosy: fijall priority: normal severity: normal status: open title: Segfault when using re.finditer over mmap type: crash versions: Python 2.7 Added file: http://bugs.python.org/file24747/x.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14212 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14212] Segfault when using re.finditer over mmap
Matthew Barnett pyt...@mrabarnett.plus.com added the comment: It segfaults because it attempts to access the buffer of an mmap that has been closed. It would be certainly be more friendly if it checked whether the mmap was still open and, if not, raised an exception instead. -- nosy: +mrabarnett ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14212 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com