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

parse_string.c: free "str" #85060

Closed
skrah mannequin opened this issue Jun 5, 2020 · 3 comments
Closed

parse_string.c: free "str" #85060

skrah mannequin opened this issue Jun 5, 2020 · 3 comments

Comments

@skrah
Copy link
Mannequin

skrah mannequin commented Jun 5, 2020

BPO 40883
Nosy @skrah, @lysnikolaou, @pablogsal, @miss-islington
PRs
  • bpo-40883: Fix memory leak in fstring_compile_expr in parse_string.c #20667
  • [3.9] bpo-40883: Fix memory leak in fstring_compile_expr in parse_string.c (GH-20667) #20669
  • 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 = None
    closed_at = <Date 2020-06-06.00:44:52.989>
    created_at = <Date 2020-06-05.22:56:57.315>
    labels = []
    title = 'parse_string.c: free "str"'
    updated_at = <Date 2020-06-06.00:44:52.988>
    user = 'https://github.com/skrah'

    bugs.python.org fields:

    activity = <Date 2020-06-06.00:44:52.988>
    actor = 'pablogsal'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-06-06.00:44:52.989>
    closer = 'pablogsal'
    components = []
    creation = <Date 2020-06-05.22:56:57.315>
    creator = 'skrah'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 40883
    keywords = ['patch']
    message_count = 3.0
    messages = ['370795', '370797', '370799']
    nosy_count = 4.0
    nosy_names = ['skrah', 'lys.nikolaou', 'pablogsal', 'miss-islington']
    pr_nums = ['20667', '20669']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue40883'
    versions = []

    @skrah
    Copy link
    Mannequin Author

    skrah mannequin commented Jun 5, 2020

    Also in test_decimal, there's a small leak here:

    ==10040== 24 bytes in 1 blocks are definitely lost in loss record 549 of 5,095
    ==10040== at 0x4C2DE56: malloc (vg_replace_malloc.c:299)
    ==10040== by 0x643B33: fstring_compile_expr (parse_string.c:594)
    ==10040== by 0x643B33: fstring_find_expr (parse_string.c:924)
    ==10040== by 0x643B33: fstring_find_literal_and_expr (parse_string.c:1076)
    ==10040== by 0x643B33: _PyPegen_FstringParser_ConcatFstring (parse_string.c:1293)
    ==10040== by 0x644569: fstring_parse (parse_string.c:1409)
    ==10040== by 0x644569: fstring_find_expr (parse_string.c:980)
    ==10040== by 0x644569: fstring_find_literal_and_expr (parse_string.c:1076)
    ==10040== by 0x644569: _PyPegen_FstringParser_ConcatFstring (parse_string.c:1293)
    ==10040== by 0x62CE94: _PyPegen_concatenate_strings (pegen.c:2003)
    ==10040== by 0x62EF52: strings_rule (parse.c:10834)
    ==10040== by 0x62EF52: atom_rule (parse.c:10674)
    ==10040== by 0x6389A2: t_primary_raw (parse.c:14042)
    ==10040== by 0x6389A2: t_primary_rule (parse.c:13839)
    ==10040== by 0x638D67: star_target_rule (parse.c:12684)
    ==10040== by 0x6392FC: star_targets_rule (parse.c:12501)
    ==10040== by 0x63BD7B: _tmp_135_rule (parse.c:23255)
    ==10040== by 0x63BD7B: _loop1_22_rule (parse.c:16468)
    ==10040== by 0x63BD7B: assignment_rule (parse.c:2116)
    ==10040== by 0x63BD7B: small_stmt_rule (parse.c:1508)
    ==10040== by 0x63DB44: simple_stmt_rule (parse.c:1406)
    ==10040== by 0x63F995: statement_rule (parse.c:1240)
    ==10040== by 0x63F995: _loop1_11_rule (parse.c:15835)
    ==10040== by 0x63F995: statements_rule (parse.c:1175)
    ==10040== by 0x63FB49: block_rule (parse.c:6127)

    @pablogsal
    Copy link
    Member

    New changeset a54096e by Pablo Galindo in branch 'master':
    bpo-40883: Fix memory leak in fstring_compile_expr in parse_string.c (GH-20667)
    a54096e

    @miss-islington
    Copy link
    Contributor

    New changeset 79e6c15 by Miss Islington (bot) in branch '3.9':
    bpo-40883: Fix memory leak in fstring_compile_expr in parse_string.c (GH-20667)
    79e6c15

    @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
    None yet
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants