SIGSEGV in exit(0) every time !?

Eric Bourque ericb@computer.org
Fri May 12 10:33:00 GMT 2000


I'm a little perplexed by the following. Every time I execute, my
program crashes while exiting. Everything else is working fine. The same
code works fine under egcs-1.1.2 w/libstc++ 2.9.0. Below I'm using gcc
2.95.2 w/libstdc++ 2.90.8. Any ideas? Here's the call stack:

#0  0x40579eec in chunk_free (ar_ptr=0x4060e040, p=0x80753b8) at
malloc.c:3047
#1  0x40579d75 in __libc_free (mem=0x80753c0) at malloc.c:2959
#2  0x404cd427 in __builtin_vec_delete (ptr=0x80753c0)
    at ../../gcc-2.95.2/gcc/cp/new2.cc:62
#3  0x4048b302 in std::basic_filebuf<char, std::char_traits<char>
>::close (
    this=0x8074d78) at
../../../../gcc-2.95.2/libstdc++/bits/fstream.tcc:149
#4  0x404b8654 in std::basic_filebuf<char, std::char_traits<char>
>::~basic_filebuf (this=0x8074d78, __in_chrg=3)
    at ../../../../gcc-2.95.2/libstdc++/bits/std_fstream.h:87
#5  0x4046cf9f in std::ios_base::Init::~Init (this=0x40502a18,
__in_chrg=2)
    at ../../../../gcc-2.95.2/libstdc++/src/ios.cc:118
#6  0x4046e0f3 in __static_initialization_and_destruction_0
(__initialize_p=0, 
    __priority=65535)
    at ../../../../gcc-2.95.2/libstdc++/bits/std_iostream.h:55
#7  0x4046e14d in global destructors keyed to std::ios_base::boolalpha
()
    at ../../../../gcc-2.95.2/libstdc++/src/ios.cc:278
#8  0x40466684 in __do_global_dtors_aux ()
   from /home/ericb/gcc/lib/libstdc++.so.3
#9  0x404d55c1 in _fini () from /home/ericb/gcc/lib/libstdc++.so.3
#10 0x4000a6a6 in _dl_fini () at dl-fini.c:40
#11 0x405419e6 in exit (status=0) at exit.c:57
#12 0x405391f1 in __libc_start_main () at
../sysdeps/generic/libc-start.c:90


Thanks,

Eric


More information about the Libstdc++ mailing list