Bug 29254 - A Potential Memory Leak Bug
Summary: A Potential Memory Leak Bug
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: binutils (show other bugs)
Version: 2.34
: P2 normal
Target Milestone: 2.39
Assignee: Alan Modra
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-16 09:16 UTC by yuxuan He
Modified: 2022-06-17 12:26 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed: 2022-06-17 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yuxuan He 2022-06-16 09:16:08 UTC
Hi, I found a potential memory leak bug in the project source code of binutils, and I have shown the execution sequence of the program that may have generated the bug on a diagram(https://user-images.githubusercontent.com/87304478/174035801-cf547930-1b3e-484b-b9af-4454bcd749a3.png). The red text illustrates the steps that created the bug, the red arrows represent the call relationships, and the green text illustrates the file and function where the code snippet is located below the green text.
I look forward to your reply and thank you very much for your patience!
Comment 1 cvs-commit@gcc.gnu.org 2022-06-17 11:59:27 UTC
The master branch has been updated by Alan Modra <amodra@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0ebc886149c22aceaf8ed74267821a59ca9d03eb

commit 0ebc886149c22aceaf8ed74267821a59ca9d03eb
Author: Alan Modra <amodra@gmail.com>
Date:   Fri Jun 17 09:00:41 2022 +0930

    PR29254, memory leak in stab_demangle_v3_arg
    
            PR 29254
            * stabs.c (stab_demangle_v3_arg): Free dt on failure path.
Comment 2 Alan Modra 2022-06-17 12:18:59 UTC
Fixed for 2.39
Comment 3 yuxuan He 2022-06-17 12:26:51 UTC
(In reply to Alan Modra from comment #2)
> Fixed for 2.39

thank you!