This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: re.finditer iterator is not reentrant, but doesn't protect against nested calls to __next__
Type: crash Stage: resolved
Components: Regular Expressions Versions: Python 3.11, Python 3.10, Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: abacabadabacaba, ezio.melotti, miss-islington, mrabarnett, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2015-03-17 17:17 by abacabadabacaba, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 32012 merged serhiy.storchaka, 2022-03-20 20:17
PR 32025 merged miss-islington, 2022-03-21 11:01
PR 32026 merged miss-islington, 2022-03-21 11:01
Messages (4)
msg238323 - (view) Author: Evgeny Kapun (abacabadabacaba) Date: 2015-03-17 17:17
Iterator returned by re.finditer includes a SRE_STATE value, which is not designed to be used concurrently. However, it is possible to call __next__ on such iterator while another such call is in progress, e.g. from a signal handler. This may result in corruption of SRE_STATE structure.
msg415675 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2022-03-21 11:00
New changeset 08eb754d840696914928355014c2d424131f8835 by Serhiy Storchaka in branch 'main':
bpo-23691: Protect the re.finditer() iterator from re-entering (GH-32012)
https://github.com/python/cpython/commit/08eb754d840696914928355014c2d424131f8835
msg415678 - (view) Author: miss-islington (miss-islington) Date: 2022-03-21 11:28
New changeset f89949ec6741bd02841bece61f5b703e738dd13c by Miss Islington (bot) in branch '3.9':
bpo-23691: Protect the re.finditer() iterator from re-entering (GH-32012)
https://github.com/python/cpython/commit/f89949ec6741bd02841bece61f5b703e738dd13c
msg415679 - (view) Author: miss-islington (miss-islington) Date: 2022-03-21 11:31
New changeset 1b21b55ee0ea57226c52dc9f3ee3c034a5d1dc7b by Miss Islington (bot) in branch '3.10':
bpo-23691: Protect the re.finditer() iterator from re-entering (GH-32012)
https://github.com/python/cpython/commit/1b21b55ee0ea57226c52dc9f3ee3c034a5d1dc7b
History
Date User Action Args
2022-04-11 14:58:14adminsetgithub: 67879
2022-03-21 12:49:20serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2022-03-21 11:31:07miss-islingtonsetmessages: + msg415679
2022-03-21 11:28:49miss-islingtonsetmessages: + msg415678
2022-03-21 11:01:14miss-islingtonsetpull_requests: + pull_request30115
2022-03-21 11:01:09miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request30114
2022-03-21 11:00:46serhiy.storchakasetmessages: + msg415675
2022-03-20 20:17:52serhiy.storchakasetversions: + Python 3.9, Python 3.10, Python 3.11, - Python 2.7, Python 3.6, Python 3.7
2022-03-20 20:17:23serhiy.storchakasetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request30100
2017-11-16 13:27:57serhiy.storchakasetassignee: serhiy.storchaka
stage: needs patch

nosy: + serhiy.storchaka
versions: + Python 2.7, Python 3.6, Python 3.7, - Python 3.4
2015-03-17 17:17:06abacabadabacabacreate