Thread: segmentation fault before main

  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,130
    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, 03:29 PM
  2. Replies: 7
    Last Post: 12-10-2004, 01: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