Core dump when using std iostream functions.

From: Flavia (dflavia_at_gmail.com)
Date: 03/23/05

  • Next message: Flavia: "Core dump when using standard iostream functions."
    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.


  • Next message: Flavia: "Core dump when using standard iostream functions."

    Relevant Pages

    • TRU64 /bin/chsh overflow
      ... % uname -a ... dbx version 5.1 ... Core file created by program "chsh" ... signal Segmentation fault at ...
      (Vuln-Dev)
    • Re: Debugging : Hard Time.! ?
      ... pstack is not showing SIGSEV but dbx threads is showing something ... load the core into mdb: ...
      (comp.unix.programmer)
    • cannot run dbx to debug a core...
      ... I got a core from my client but i am not able to find out where it ... however, this time, the DBX itself crashed. ... Reading GL_CliConnMgr ... See `help core mismatch' for more details. ...
      (comp.lang.cpp)
    • Re: Compaq tru64 setuids /usr/bin/at and /usr/dt/bin/mailcv
      ... Memory fault - core dumped ... dbx version 5.1 ... >>> exception dispatch or unwind stuck in infinite loop exception ...
      (Vuln-Dev)
    • Re: command similar to pstack on AIX433
      ... you can use dbx to get the program name too. ... If you have a core ... file from a program called "dropcore", ... > you could use the "dump" command, that will dump all sorts from a core ...
      (comp.unix.aix)