public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/6246: gcc generates code that memleaks
@ 2002-04-10  3:36 clemens
  0 siblings, 0 replies; only message in thread
From: clemens @ 2002-04-10  3:36 UTC (permalink / raw)
  To: gcc-gnats


>Number:         6246
>Category:       c++
>Synopsis:       gcc generates code that memleaks
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 10 03:36:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     thf
>Release:        2.0.95
>Organization:
>Environment:
linux 2.4.17 glibc 2.2.4 dual celeron@433MHz
>Description:
testprogramm leaks 100bytes on each iteration depending on the  
location of "strstream str" declaration.
>How-To-Repeat:
#include <strstream>
#include <string>

#include <unistd.h>

static string *buf = NULL;

int
main(int argc, char **argv) {
// strstream str;

   while (1) {
      strstream str;

      buf = new string();
      str << 1;
      *buf += str.str();
      sleep(1);
      delete (buf);
   }
   return (0);
}
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-04-10 10:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-10  3:36 c++/6246: gcc generates code that memleaks clemens

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).