| View previous topic :: View next topic |
| Author |
Message |
Christer Borgqvist Guest
|
Posted: Sat Dec 09, 2006 7:44 pm Post subject: std::stringstream |
|
|
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
|
Posted: Sun Dec 10, 2006 5:45 pm Post subject: Re: std::stringstream |
|
|
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
|
Posted: Sun Dec 10, 2006 7:16 pm Post subject: Re: std::stringstream |
|
|
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
|
Posted: Sun Dec 10, 2006 11:14 pm Post subject: Re: std::stringstream |
|
|
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
|
Posted: Mon Dec 11, 2006 7:33 pm Post subject: Re: std::stringstream |
|
|
"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
|
Posted: Tue Dec 12, 2006 6:00 am Post subject: Re: std::stringstream |
|
|
| 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 |
|
 |
|