public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/58737] New: leak in std::regex_match
@ 2013-10-15 11:25 larsbj at lyx dot org
2013-10-15 11:26 ` [Bug libstdc++/58737] " larsbj at lyx dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: larsbj at lyx dot org @ 2013-10-15 11:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58737
Bug ID: 58737
Summary: leak in std::regex_match
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: larsbj at lyx dot org
I have something that certainly looks like a memory leak.
g++ --version
g++ (GCC) 4.9.0 20131014 (experimental)
g++ -std=gnu++11 -O2 leak.cpp
If I increase the amount of looping the leak reports
increases linearly.
All output from valgrind below. It might be regex or it might be some
allocator issue, I have seen something with std::deque as well outside
any regex context. Not been able to reproduce though.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/58737] leak in std::regex_match
2013-10-15 11:25 [Bug libstdc++/58737] New: leak in std::regex_match larsbj at lyx dot org
@ 2013-10-15 11:26 ` larsbj at lyx dot org
2013-10-15 11:27 ` larsbj at lyx dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: larsbj at lyx dot org @ 2013-10-15 11:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58737
--- Comment #1 from larsbj at lyx dot org ---
Created attachment 31011
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31011&action=edit
small program showing the problem
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/58737] leak in std::regex_match
2013-10-15 11:25 [Bug libstdc++/58737] New: leak in std::regex_match larsbj at lyx dot org
2013-10-15 11:26 ` [Bug libstdc++/58737] " larsbj at lyx dot org
@ 2013-10-15 11:27 ` larsbj at lyx dot org
2013-10-15 11:32 ` redi at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: larsbj at lyx dot org @ 2013-10-15 11:27 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58737
--- Comment #2 from larsbj at lyx dot org ---
Created attachment 31012
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31012&action=edit
output from valgrind
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/58737] leak in std::regex_match
2013-10-15 11:25 [Bug libstdc++/58737] New: leak in std::regex_match larsbj at lyx dot org
2013-10-15 11:26 ` [Bug libstdc++/58737] " larsbj at lyx dot org
2013-10-15 11:27 ` larsbj at lyx dot org
@ 2013-10-15 11:32 ` redi at gcc dot gnu.org
2013-10-15 14:50 ` paolo.carlini at oracle dot com
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2013-10-15 11:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58737
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-10-15
CC| |timshen at gcc dot gnu.org
Ever confirmed|0 |1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/58737] leak in std::regex_match
2013-10-15 11:25 [Bug libstdc++/58737] New: leak in std::regex_match larsbj at lyx dot org
` (2 preceding siblings ...)
2013-10-15 11:32 ` redi at gcc dot gnu.org
@ 2013-10-15 14:50 ` paolo.carlini at oracle dot com
2013-10-15 15:01 ` timshen at gcc dot gnu.org
2013-10-15 15:06 ` paolo.carlini at oracle dot com
5 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-10-15 14:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58737
--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Maybe:
Index: regex_executor.h
===================================================================
--- regex_executor.h (revision 203587)
+++ regex_executor.h (working copy)
@@ -155,6 +155,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
virtual bool
_M_main() = 0;
+ virtual
+ ~_Executor() { }
+
_BiIter _M_current;
const _BiIter _M_begin;
const _BiIter _M_end;
Eh, eh ;) ;)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/58737] leak in std::regex_match
2013-10-15 11:25 [Bug libstdc++/58737] New: leak in std::regex_match larsbj at lyx dot org
` (3 preceding siblings ...)
2013-10-15 14:50 ` paolo.carlini at oracle dot com
@ 2013-10-15 15:01 ` timshen at gcc dot gnu.org
2013-10-15 15:06 ` paolo.carlini at oracle dot com
5 siblings, 0 replies; 7+ messages in thread
From: timshen at gcc dot gnu.org @ 2013-10-15 15:01 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58737
--- Comment #4 from Tim Shen <timshen at gcc dot gnu.org> ---
Author: timshen
Date: Tue Oct 15 15:01:44 2013
New Revision: 203610
URL: http://gcc.gnu.org/viewcvs?rev=203610&root=gcc&view=rev
Log:
2013-10-15 Tim Shen <timshen91@gmail.com>
PR libstdc++/58737
* include/bits/regex_automaton.h (_Automaton<>::~_Automaton): Fix memory
leak by adding it.
* include/bits/regex_executor.h (_Executor<>::~_Executor): Likewise.
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/regex_automaton.h
trunk/libstdc++-v3/include/bits/regex_executor.h
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libstdc++/58737] leak in std::regex_match
2013-10-15 11:25 [Bug libstdc++/58737] New: leak in std::regex_match larsbj at lyx dot org
` (4 preceding siblings ...)
2013-10-15 15:01 ` timshen at gcc dot gnu.org
@ 2013-10-15 15:06 ` paolo.carlini at oracle dot com
5 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-10-15 15:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58737
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |4.9.0
--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Fixed.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-10-15 15:06 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-15 11:25 [Bug libstdc++/58737] New: leak in std::regex_match larsbj at lyx dot org
2013-10-15 11:26 ` [Bug libstdc++/58737] " larsbj at lyx dot org
2013-10-15 11:27 ` larsbj at lyx dot org
2013-10-15 11:32 ` redi at gcc dot gnu.org
2013-10-15 14:50 ` paolo.carlini at oracle dot com
2013-10-15 15:01 ` timshen at gcc dot gnu.org
2013-10-15 15:06 ` paolo.carlini at oracle dot com
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).