BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

std::stringstream

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Language C++)
View previous topic :: View next topic  
Author Message
Christer Borgqvist
Guest





PostPosted: Sat Dec 09, 2006 7:44 pm    Post subject: std::stringstream Reply with quote



Don`t now if this is the right group, but I`m using a std::stringstream
and run BDS 2006 with Codeguard and get the following
Pointer in freed memory in process: Project1.exe(1264) -
c:\program\borland\bds\4.0\include\dinkumware\sstream#125
0x00F9A248-0x00F9A248.
0x0041728C - c:\program\borland\bds\4.0\include\dinkumware\sstream#125
0x0041568F -
c:\program\borland\bds\4.0\include\dinkumware\streambuf#465
0x0040AA01 -
c:\program\borland\bds\4.0\include\dinkumware\streambuf#151
0x004049BC - c:\program\borland\bds\4.0\include\dinkumware\ostream#679
0x00406B10 - D:\project\BDS\temp\boost_threads\Unit1.cpp#284
0x52058F46
The object (0x00F9A248) [size: 32 bytes] was created with new
0x00411444 - c:\program\borland\bds\4.0\include\dinkumware\xmemory#28
0x004103C4 - c:\program\borland\bds\4.0\include\dinkumware\xmemory#143
0x00417173 - c:\program\borland\bds\4.0\include\dinkumware\sstream#105
0x0041568F -
c:\program\borland\bds\4.0\include\dinkumware\streambuf#465
0x0040AA01 -
c:\program\borland\bds\4.0\include\dinkumware\streambuf#151
0x004049BC - c:\program\borland\bds\4.0\include\dinkumware\ostream#679
The object (0x00F9A248) was deleted with delete
0x0040BA76 - c:\program\borland\bds\4.0\include\dinkumware\xmemory#138
0x004171CC - c:\program\borland\bds\4.0\include\dinkumware\sstream#111
0x0041568F -
c:\program\borland\bds\4.0\include\dinkumware\streambuf#465
0x0040AA01 -
c:\program\borland\bds\4.0\include\dinkumware\streambuf#151
0x004049BC - c:\program\borland\bds\4.0\include\dinkumware\ostream#679
0x00406B10 - D:\project\BDS\temp\boost_threads\Unit1.cpp#284

why?

//Christer
Back to top
Thomas Maeder [TeamB]
Guest





PostPosted: Sun Dec 10, 2006 5:45 pm    Post subject: Re: std::stringstream Reply with quote



Christer Borgqvist <christer.borgqvist10 (AT) bredband (DOT) net> writes:

Quote:
Don`t now if this is the right group, but I`m using a
std::stringstream and run BDS 2006 with Codeguard and get the
following

[snip]

Please post the minimal program that causes this to happen.
Back to top
Christer Borgqvist
Guest





PostPosted: Sun Dec 10, 2006 7:16 pm    Post subject: Re: std::stringstream Reply with quote



Thomas Maeder [TeamB] skrev:
Quote:
Christer Borgqvist <christer.borgqvist10 (AT) bredband (DOT) net> writes:

Don`t now if this is the right group, but I`m using a
std::stringstream and run BDS 2006 with Codeguard and get the
following

[snip]

Please post the minimal program that causes this to happen.
void __fastcall TForm1::Button12Click(TObject *Sender)

{
std::stringstream ss;
ss << "insert some text";
ss << "insert some int" << 100;
}
Back to top
Thomas Maeder [TeamB]
Guest





PostPosted: Sun Dec 10, 2006 11:14 pm    Post subject: Re: std::stringstream Reply with quote

Christer Borgqvist <christer.borgqvist10 (AT) bredband (DOT) net> writes:

Quote:
Please post the minimal program that causes this to happen.

void __fastcall TForm1::Button12Click(TObject *Sender)
{
std::stringstream ss;
ss << "insert some text";
ss << "insert some int" << 100;
}

This is not a program; it's a member function.

Please post a minimal (<50 lines), *complete* command-line
(i.e. non-VCL) program.
Back to top
Arnie
Guest





PostPosted: Mon Dec 11, 2006 7:33 pm    Post subject: Re: std::stringstream Reply with quote

"Christer Borgqvist" <christer.borgqvist10 (AT) bredband (DOT) net> wrote in message
news:457abd7a$1 (AT) newsgroups (DOT) borland.com...
Quote:
Don`t now if this is the right group, but I`m using a std::stringstream
and run BDS 2006 with Codeguard and get the following
why?

//Christer

I don't know if this is the same problem or not. I use VS2005 which comes
with Dinkumware. There's a known problem in streams where the constructor
will lose memory. I do believe it was 32 bytes. I know it's not fixed in
VS2005 yet. I don't know its status in BDS.

We discovered this when using streams inside of a very loop loop - millions
of iterations. The loss was pretty obvious in our case.

- Arnie
Back to top
Arnie
Guest





PostPosted: Tue Dec 12, 2006 6:00 am    Post subject: Re: std::stringstream Reply with quote

Quote:
We discovered this when using streams inside of a very loop
loop - millions of iterations. The loss was pretty obvious in
our case.

Of course, you lnow I meant "long loop" but it was Monday morning
and I was still pretty loopy ;-)

- Arnie
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Language C++) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.