[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/31131] New: Potential Memory Leak in wrstabs.c
From: |
1157401338 at qq dot com |
Subject: |
[Bug binutils/31131] New: Potential Memory Leak in wrstabs.c |
Date: |
Sun, 10 Dec 2023 07:01:19 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=31131
Bug ID: 31131
Summary: Potential Memory Leak in wrstabs.c
Product: binutils
Version: 2.32
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: 1157401338 at qq dot com
Target Milestone: ---
Created attachment 15250
--> https://sourceware.org/bugzilla/attachment.cgi?id=15250&action=edit
picture showing the potential bug
hi, i found a potential memory leak located in binutils/wrstabs.c, function
write_stabs_in_sections_debugging_info
step1: call xmalloc to allocate memory and store it in local variable "info"
steo2: there are several paths can leak the memory, for example, if the
expression in if-statement "if (! stab_write_symbol (&info, 0, 0, 0, (const
char *) NULL))" is true, then return False, and memory leaked.
i post a picture as an attachment to show the potential bug.
can you help to check whether this bug is true? thank you very much
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/31131] New: Potential Memory Leak in wrstabs.c,
1157401338 at qq dot com <=