Article View: comp.unix.programmer
Article #3366Re: g++ 3.0.3/libstdc++-v3 thread problem - help, please
From: André Pönitz
Date: Mon, 13 May 2002 09:39
Date: Mon, 13 May 2002 09:39
18 lines
1851 bytes
1851 bytes
In gnu.g++.help Pedro Checo <pedro@checo.net> wrote: > Hi. My program core dumps with a Bus Error. gdb points to a call to > realfree() in libc.so as the point of failure. The call in my code > which leads to this problem is this instantiation of ostrstream inside > of a while() loop: > > ostrsream msg; May I suggest to use 'ostringstream' (from <sstream>) instead of 'ostrstream' from <sstream>. Although both are coveres by the Standard the former is usually much easier to handle memory-wise. Your code won't change much in any case... Andre' -- Those who desire to give up Freedom in order to gain Security, will not have, nor do they deserve, either one. (T. Jefferson)
Technical Details
Message-ID:
<abo1l0$fgs$3@narses.hrz.tu-chemnitz.de>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-han1.dfn.de!news-nue1.dfn.de!uni-erlangen.de!news.tu-chemnitz.de!not-for-mailReferences:
<be381207.0205101308.223731ef@posting.google.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: ffc1e,60c2dc3b8f48b012 X-Google-Attributes: gidffc1e,public X-Google-Thread: fc89c,60c2dc3b8f48b012 X-Google-Attributes: gidfc89c,public X-Google-Thread: 10ba33,c2823dc2ed2ba6b6 X-Google-Attributes: gid10ba33,public X-Google-ArrivalTime: 2002-05-13 02:39:45 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-han1.dfn.de!news-nue1.dfn.de!uni-erlangen.de!news.tu-chemnitz.de!not-for-mail From: André Pönitz <poenitz@gmx.de> Newsgroups: comp.unix.programmer,comp.programming.threads,gnu.g++.help Subject: Re: g++ 3.0.3/libstdc++-v3 thread problem - help, please Date: 13 May 2002 09:39:44 GMT Organization: Chemnitz University of Technology Lines: 18 Message-ID: <abo1l0$fgs$3@narses.hrz.tu-chemnitz.de> References: <be381207.0205101308.223731ef@posting.google.com> NNTP-Posting-Host: millo.mpi.htwm.de X-Trace: narses.hrz.tu-chemnitz.de 1021282784 15900 141.55.225.177 (13 May 2002 09:39:44 GMT) X-Complaints-To: abuse@tu-chemnitz.de NNTP-Posting-Date: 13 May 2002 09:39:44 GMT