public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/12438] New: Memory leak in locale::combine()
@ 2003-09-29 8:36 peturr02 at ru dot is
2003-09-29 8:41 ` [Bug libstdc++/12438] " peturr02 at ru dot is
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: peturr02 at ru dot is @ 2003-09-29 8:36 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12438
Summary: Memory leak in locale::combine()
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: peturr02 at ru dot is
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
template<typename Facet>
locale locale::combine(locale l1, locale l2) const
leaks memory if an exception is thrown because Facet isn't found in l2.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libstdc++/12438] Memory leak in locale::combine()
2003-09-29 8:36 [Bug libstdc++/12438] New: Memory leak in locale::combine() peturr02 at ru dot is
@ 2003-09-29 8:41 ` peturr02 at ru dot is
2003-09-29 8:47 ` peturr02 at ru dot is
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: peturr02 at ru dot is @ 2003-09-29 8:41 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12438
------- Additional Comments From peturr02 at ru dot is 2003-09-29 08:28 -------
Created an attachment (id=4851)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4851&action=view)
Test case
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libstdc++/12438] Memory leak in locale::combine()
2003-09-29 8:36 [Bug libstdc++/12438] New: Memory leak in locale::combine() peturr02 at ru dot is
2003-09-29 8:41 ` [Bug libstdc++/12438] " peturr02 at ru dot is
@ 2003-09-29 8:47 ` peturr02 at ru dot is
2003-09-29 11:21 ` paolo at gcc dot gnu dot org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: peturr02 at ru dot is @ 2003-09-29 8:47 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12438
------- Additional Comments From peturr02 at ru dot is 2003-09-29 08:36 -------
The signature of combine is of course
template<typename Facet>
locale locale::combine(const locale& l2) const
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libstdc++/12438] Memory leak in locale::combine()
2003-09-29 8:36 [Bug libstdc++/12438] New: Memory leak in locale::combine() peturr02 at ru dot is
2003-09-29 8:41 ` [Bug libstdc++/12438] " peturr02 at ru dot is
2003-09-29 8:47 ` peturr02 at ru dot is
@ 2003-09-29 11:21 ` paolo at gcc dot gnu dot org
2003-09-29 22:42 ` paolo at gcc dot gnu dot org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: paolo at gcc dot gnu dot org @ 2003-09-29 11:21 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12438
paolo at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |paolo at gcc dot gnu dot org
|dot org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2003-09-29 09:56:24
date| |
------- Additional Comments From paolo at gcc dot gnu dot org 2003-09-29 09:56 -------
Confirmed. Seems easy to fix, now ;)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libstdc++/12438] Memory leak in locale::combine()
2003-09-29 8:36 [Bug libstdc++/12438] New: Memory leak in locale::combine() peturr02 at ru dot is
` (2 preceding siblings ...)
2003-09-29 11:21 ` paolo at gcc dot gnu dot org
@ 2003-09-29 22:42 ` paolo at gcc dot gnu dot org
2003-09-30 12:53 ` peturr02 at ru dot is
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: paolo at gcc dot gnu dot org @ 2003-09-29 22:42 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 597 bytes --]
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12438
paolo at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |WAITING
------- Additional Comments From paolo at gcc dot gnu dot org 2003-09-29 22:16 -------
Hi Pétur. How many iterations do you think are necessary? I have tried up to
1000000 without an hard fail (disk thrashing, however).
Thanks, Paolo.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libstdc++/12438] Memory leak in locale::combine()
2003-09-29 8:36 [Bug libstdc++/12438] New: Memory leak in locale::combine() peturr02 at ru dot is
` (3 preceding siblings ...)
2003-09-29 22:42 ` paolo at gcc dot gnu dot org
@ 2003-09-30 12:53 ` peturr02 at ru dot is
2003-09-30 13:45 ` paolo at gcc dot gnu dot org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: peturr02 at ru dot is @ 2003-09-30 12:53 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12438
------- Additional Comments From peturr02 at ru dot is 2003-09-30 10:58 -------
> How many iterations do you think are necessary? I have tried up to
> 1000000 without an hard fail (disk thrashing, however).
The program won't crash until it runs out of memory, which may take
a very long time.
There is a function named set_memory_limits() in testsuite_hooks.h.
Maybe you can use that to make the program run out of memory sooner?
I don't think we want tests that use all virtual memory in the system,
or that take several hours to run.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libstdc++/12438] Memory leak in locale::combine()
2003-09-29 8:36 [Bug libstdc++/12438] New: Memory leak in locale::combine() peturr02 at ru dot is
` (4 preceding siblings ...)
2003-09-30 12:53 ` peturr02 at ru dot is
@ 2003-09-30 13:45 ` paolo at gcc dot gnu dot org
2003-09-30 14:39 ` cvs-commit at gcc dot gnu dot org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: paolo at gcc dot gnu dot org @ 2003-09-30 13:45 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 499 bytes --]
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12438
paolo at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |ASSIGNED
------- Additional Comments From paolo at gcc dot gnu dot org 2003-09-30 11:16 -------
Thanks Pétur, I will make use of your suggestion!
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libstdc++/12438] Memory leak in locale::combine()
2003-09-29 8:36 [Bug libstdc++/12438] New: Memory leak in locale::combine() peturr02 at ru dot is
` (5 preceding siblings ...)
2003-09-30 13:45 ` paolo at gcc dot gnu dot org
@ 2003-09-30 14:39 ` cvs-commit at gcc dot gnu dot org
2003-09-30 16:30 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-09-30 14:39 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12438
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2003-09-30 13:45 -------
Subject: Bug 12438
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: paolo@gcc.gnu.org 2003-09-30 13:45:00
Modified files:
libstdc++-v3 : ChangeLog
libstdc++-v3/include/bits: locale_facets.tcc locale_classes.h
Added files:
libstdc++-v3/testsuite/22_locale/locale/cons: 12438.cc
Log message:
2003-09-30 Paolo Carlini <pcarlini@unitus.it>
PR libstdc++/12438
* include/bits/locale_facets.tcc (locale::combine): Don't
leak memory if _M_replace_facet throws.
* testsuite/22_locale/locale/cons/12438.cc: New, from the PR.
* include/bits/locale_classes.h (locale::locale(const locale&,
_Facet*)): Tweak, use consistently _M_remove_reference.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&r1=1.1977&r2=1.1978
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/locale_facets.tcc.diff?cvsroot=gcc&r1=1.112&r2=1.113
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/locale_classes.h.diff?cvsroot=gcc&r1=1.11&r2=1.12
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/22_locale/locale/cons/12438.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libstdc++/12438] Memory leak in locale::combine()
2003-09-29 8:36 [Bug libstdc++/12438] New: Memory leak in locale::combine() peturr02 at ru dot is
` (6 preceding siblings ...)
2003-09-30 14:39 ` cvs-commit at gcc dot gnu dot org
@ 2003-09-30 16:30 ` pinskia at gcc dot gnu dot org
2003-09-30 16:42 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-09-30 16:30 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12438
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-09-30 15:47 -------
Fixed.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libstdc++/12438] Memory leak in locale::combine()
2003-09-29 8:36 [Bug libstdc++/12438] New: Memory leak in locale::combine() peturr02 at ru dot is
` (7 preceding siblings ...)
2003-09-30 16:30 ` pinskia at gcc dot gnu dot org
@ 2003-09-30 16:42 ` pinskia at gcc dot gnu dot org
2004-01-19 0:13 ` cvs-commit at gcc dot gnu dot org
2004-01-19 0:14 ` paolo at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-09-30 16:42 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12438
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |3.4
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libstdc++/12438] Memory leak in locale::combine()
2003-09-29 8:36 [Bug libstdc++/12438] New: Memory leak in locale::combine() peturr02 at ru dot is
` (8 preceding siblings ...)
2003-09-30 16:42 ` pinskia at gcc dot gnu dot org
@ 2004-01-19 0:13 ` cvs-commit at gcc dot gnu dot org
2004-01-19 0:14 ` paolo at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-01-19 0:13 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-01-19 00:13 -------
Subject: Bug 12438
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-3_3-branch
Changes by: paolo@gcc.gnu.org 2004-01-19 00:12:55
Modified files:
libstdc++-v3 : ChangeLog
libstdc++-v3/include/bits: locale_classes.h locale_facets.tcc
libstdc++-v3/src: locale.cc localename.cc
Log message:
2004-01-19 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/12352
PR libstdc++/12438
* include/bits/locale_classes.h (locale::locale(const locale&,
_Facet*)): Don't leak memory on exception.
* include/bits/locale_facets.tcc (locale::combine(const locale&)):
Likewise.
* src/locale.cc (locale::locale(const char*)): Likewise.
* src/localename.cc (locale::_Impl::~_Impl(),
locale::_Impl::_Impl(const _Impl&, size_t),
locale::_Impl::_Impl(const char*, size_t)): Likewise.
(locale::_Impl::_M_replace_categories(const _Impl*, category):
Tweak.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.1464.2.165&r2=1.1464.2.166
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/locale_classes.h.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.1.2.3&r2=1.1.2.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/locale_facets.tcc.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.82.4.14&r2=1.82.4.15
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/src/locale.cc.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.72.2.4&r2=1.72.2.5
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/src/localename.cc.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.33.2.4&r2=1.33.2.5
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12438
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug libstdc++/12438] Memory leak in locale::combine()
2003-09-29 8:36 [Bug libstdc++/12438] New: Memory leak in locale::combine() peturr02 at ru dot is
` (9 preceding siblings ...)
2004-01-19 0:13 ` cvs-commit at gcc dot gnu dot org
@ 2004-01-19 0:14 ` paolo at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: paolo at gcc dot gnu dot org @ 2004-01-19 0:14 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.4.0 |3.3.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12438
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2004-01-19 0:14 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-29 8:36 [Bug libstdc++/12438] New: Memory leak in locale::combine() peturr02 at ru dot is
2003-09-29 8:41 ` [Bug libstdc++/12438] " peturr02 at ru dot is
2003-09-29 8:47 ` peturr02 at ru dot is
2003-09-29 11:21 ` paolo at gcc dot gnu dot org
2003-09-29 22:42 ` paolo at gcc dot gnu dot org
2003-09-30 12:53 ` peturr02 at ru dot is
2003-09-30 13:45 ` paolo at gcc dot gnu dot org
2003-09-30 14:39 ` cvs-commit at gcc dot gnu dot org
2003-09-30 16:30 ` pinskia at gcc dot gnu dot org
2003-09-30 16:42 ` pinskia at gcc dot gnu dot org
2004-01-19 0:13 ` cvs-commit at gcc dot gnu dot org
2004-01-19 0:14 ` paolo 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).