Core dump when using std iostream functions.
From: Flavia (dflavia_at_gmail.com)
Date: 03/23/05
- Previous message: Bob Harris: "Re: pipe files"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 23 Mar 2005 04:07:52 -0800
Hello,
I am using Compaq Tru64 UNIX V5.1B. I have written a sample program
that just writes to standard stream. However, executing this results
in a core dump. Running dbx on the generated core showed that the
segmentation fault is at _ZNSo6sentryC1ERSo() ["ostream-inst.cc":6,
0x3ffbffd2250]. Below is the compiler version, sample code, dbx
output.
Version of g++
%g++ -v
Reading specs from /usr/local/gcc340/lib/gcc-lib/alphaev68-dec-osf5.1/3.2.3/specs
Configured with: ./configure --host=alphaev68-dec-osf5.1
--prefix=/usr/local/gcc340 --enable-languages=c,c++,f77,objc,ada
--enable-version-specific-runtime-libs --enable-shared --enable-libgcj
--with-gc=simple --enable-nls --enable-interpreter
Thread model: single
gcc version 3.2.3
My sample code:
#include <iostream>
int main()
{
std::cout << "Cout dumps core";
}
%
%
%
%g++ -g -Wall -o hellow hellow.cpp
%./hellow
Segmentation fault (core dumped)
%dbx ./hellow core
dbx version 5.1
Type 'help' for help.
Core file created by program "hellow"
signal Segmentation fault at [_ZNSo6sentryC1ERSo:6
+0x2050,0x3ffbffd2250] Source not available
(dbx) where
> 0 _ZNSo6sentryC1ERSo() ["ostream-inst.cc":6, 0x3ffbffd2250]
1 _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc()
["ostream-inst.cc":6, 0x3ffbffd2638]
2 main() ["hellow.cpp":6, 0x1200013b8]
(dbx) q
Any thoughts?
Thanks,
Flavia.
- Previous message: Bob Harris: "Re: pipe files"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|