Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

re.finditer iterator is not reentrant, but doesn't protect against nested calls to __next__ #67879

Closed
abacabadabacaba mannequin opened this issue Mar 17, 2015 · 4 comments
Assignees
Labels
3.9 only security fixes 3.10 only security fixes 3.11 only security fixes topic-regex type-crash A hard crash of the interpreter, possibly with a core dump

Comments

@abacabadabacaba
Copy link
Mannequin

abacabadabacaba mannequin commented Mar 17, 2015

BPO 23691
Nosy @ezio-melotti, @serhiy-storchaka, @miss-islington
PRs
  • bpo-23691: Protect the re.finditer() iterator from re-entering #32012
  • [3.10] bpo-23691: Protect the re.finditer() iterator from re-entering (GH-32012) #32025
  • [3.9] bpo-23691: Protect the re.finditer() iterator from re-entering (GH-32012) #32026
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/serhiy-storchaka'
    closed_at = <Date 2022-03-21.12:49:20.842>
    created_at = <Date 2015-03-17.17:17:06.635>
    labels = ['expert-regex', '3.10', '3.9', 'type-crash', '3.11']
    title = "re.finditer iterator is not reentrant, but doesn't protect against nested calls to __next__"
    updated_at = <Date 2022-03-21.12:49:20.842>
    user = 'https://bugs.python.org/abacabadabacaba'

    bugs.python.org fields:

    activity = <Date 2022-03-21.12:49:20.842>
    actor = 'serhiy.storchaka'
    assignee = 'serhiy.storchaka'
    closed = True
    closed_date = <Date 2022-03-21.12:49:20.842>
    closer = 'serhiy.storchaka'
    components = ['Regular Expressions']
    creation = <Date 2015-03-17.17:17:06.635>
    creator = 'abacabadabacaba'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 23691
    keywords = ['patch']
    message_count = 4.0
    messages = ['238323', '415675', '415678', '415679']
    nosy_count = 5.0
    nosy_names = ['ezio.melotti', 'mrabarnett', 'abacabadabacaba', 'serhiy.storchaka', 'miss-islington']
    pr_nums = ['32012', '32025', '32026']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'crash'
    url = 'https://bugs.python.org/issue23691'
    versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

    @abacabadabacaba
    Copy link
    Mannequin Author

    abacabadabacaba mannequin commented Mar 17, 2015

    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.

    @abacabadabacaba abacabadabacaba mannequin added topic-regex type-crash A hard crash of the interpreter, possibly with a core dump labels Mar 17, 2015
    @serhiy-storchaka serhiy-storchaka added the 3.7 (EOL) end of life label Nov 16, 2017
    @serhiy-storchaka serhiy-storchaka self-assigned this Nov 16, 2017
    @serhiy-storchaka serhiy-storchaka added 3.9 only security fixes 3.10 only security fixes 3.11 only security fixes and removed 3.7 (EOL) end of life labels Mar 20, 2022
    @serhiy-storchaka
    Copy link
    Member

    New changeset 08eb754 by Serhiy Storchaka in branch 'main':
    bpo-23691: Protect the re.finditer() iterator from re-entering (GH-32012)
    08eb754

    @miss-islington
    Copy link
    Contributor

    New changeset f89949e by Miss Islington (bot) in branch '3.9':
    bpo-23691: Protect the re.finditer() iterator from re-entering (GH-32012)
    f89949e

    @miss-islington
    Copy link
    Contributor

    New changeset 1b21b55 by Miss Islington (bot) in branch '3.10':
    bpo-23691: Protect the re.finditer() iterator from re-entering (GH-32012)
    1b21b55

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.9 only security fixes 3.10 only security fixes 3.11 only security fixes topic-regex type-crash A hard crash of the interpreter, possibly with a core dump
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants