Title: re.finditer iterator is not reentrant, but doesn't protect against nested calls to __next__
Type: crash Stage: needs patch
Components: Regular Expressions Versions: Python 3.7, Python 3.6, Python 2.7
Status: open Resolution:
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: abacabadabacaba, ezio.melotti, mrabarnett, serhiy.storchaka
Priority: normal Keywords:

Created on 2015-03-17 17:17 by abacabadabacaba, last changed 2017-11-16 13:27 by serhiy.storchaka.

Messages (1)
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.
Date User Action Args
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