segmentation fault before main

This is a discussion on segmentation fault before main within the C++ Programming forums, part of the General Programming Boards category; Hello, I'm using gcc_2.95.3-2 and I get a segmentation fault before main. In gdb seting break _init doesn't help, it ...

  1. #1
    Cristian Negresco
    Guest

    segmentation fault before main

    Hello,

    I'm using gcc_2.95.3-2 and I get a segmentation fault before main.
    In gdb seting break _init doesn't help, it seems that the error appears before loading the shared libraries.
    Any help?

    Thanks,
    Cristian

  2. #2
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,139
    Any variables that are global or local to main will have their constructors called before main. So if one of those segfaults, it happens before main.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Segmentation fault
    By NoUse in forum C Programming
    Replies: 4
    Last Post: 03-26-2005, 02:29 PM
  2. Replies: 7
    Last Post: 12-10-2004, 12:58 AM
  3. Annoying Segmentation Fault
    By Zildjian in forum C++ Programming
    Replies: 7
    Last Post: 10-08-2004, 02:07 PM
  4. Segmentation fault...
    By alvifarooq in forum C++ Programming
    Replies: 14
    Last Post: 09-26-2004, 12:53 PM
  5. Seg Fault on return from main?????
    By Unregister in forum C Programming
    Replies: 8
    Last Post: 10-22-2002, 09:56 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21