segfault in ofstream destructor

brent verner brent@rcfile.org
Wed Jun 14 19:44:00 GMT 2000


on Wed, Jun 14, 2000 at 07:35:17PM -0700, Rob Willis typed aloud:
| 
| When i try running the following trivial program, i'm getting a segfault
| at:
| 
| g++-v3/bits/std_fstream.h:
| ~basic_ofstream()
| {
|   delete _M_streambuf;  // seg faults here
|   ...
| }
| 
| The program:
| 
| #include <fstream>
| int main()
| {
|   std::ofstream ofs;
| }
| 
| Compiled with:
| c++ -g test.cpp
| 
| I am using the gcc snapshot:  egcs-20000612.tar.gz

likewise.

| Any ideas?? 

I can't duplicate your problem. Are you certain you are compiling
with the new c++ -- what does `which c++` say? Is it linking with
the proper shared lib -- what does `nm a.out` say?

hth.
  brent

-- 
Damon Brent Verner
Cracker Jack® Certified Professional
brent@rcfile.org, brent@linux1.org


More information about the Libstdc++ mailing list