public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/36819] New: memleak in split_quote_chain
@ 2008-07-14 4:22 wuhui1973 at 21cn dot com
2008-12-27 21:50 ` [Bug c++/36819] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: wuhui1973 at 21cn dot com @ 2008-07-14 4:22 UTC (permalink / raw)
To: gcc-bugs
The definition of the function is in c-inpath.c as following.
void
split_quote_chain (void)
{
heads[QUOTE] = heads[BRACKET];
tails[QUOTE] = tails[BRACKET];
heads[BRACKET] = NULL;
tails[BRACKET] = NULL;
/* This is NOT redundant. */
quote_ignores_source_dir = true;
}
The elements in heads and tails point to the head and tail of certain list, and
the items in these lists are xmalloc in add_path. For above operation, memory
allocated for QUOTE list is leaked. Seems should invoke free_path first to
release the resource before the assignment.
This leakage will happen if we use -I- switch!
--
Summary: memleak in split_quote_chain
Product: gcc
Version: 3.4.6
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: wuhui1973 at 21cn dot com
GCC build triplet: i686-dell-linux
GCC host triplet: i686-dell-linux
GCC target triplet: i686-dell-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36819
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/36819] memleak in split_quote_chain
2008-07-14 4:22 [Bug c++/36819] New: memleak in split_quote_chain wuhui1973 at 21cn dot com
@ 2008-12-27 21:50 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-12-27 21:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2008-12-27 21:48 -------
Confirmed, though -I- is obsolete.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
GCC build triplet|i686-dell-linux |
GCC host triplet|i686-dell-linux |
GCC target triplet|i686-dell-linux |
Known to fail| |4.4.0 4.3.0
Last reconfirmed|0000-00-00 00:00:00 |2008-12-27 21:48:37
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36819
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-12-27 21:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-14 4:22 [Bug c++/36819] New: memleak in split_quote_chain wuhui1973 at 21cn dot com
2008-12-27 21:50 ` [Bug c++/36819] " pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).