[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

How can I trace a segfault on program start?



I have compiled a program with gcc 2.95.  It segfaults immediately on starting
and neither gdb nor strace reveal any useful information:


olly@linda:.../src$ people
Segmentation fault (core dumped)
olly@linda:.../src$ gdb people
GNU gdb 2001-07-05-cvs (MI_OUT)
...
(gdb) run
Starting program: /usr1/proj/bray/gtk/people_glade/src/people 

Program received signal SIGSEGV, Segmentation fault.
0x00000001 in ?? ()
(gdb) bt
#0  0x00000001 in ?? ()
Cannot access memory at address 0x0
(gdb) q
The program is running.  Exit anyway? (y or n) y
olly@linda:.../src$ strace people
execve("./people", ["people"], [/* 49 vars */]) = 0
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++


The program is C code generated by smalleiffel, with many libraries linked in.
I have recompiled any object files that are not part of other packages.  There
are no compilation problems.

How can I find out where the problem is?

Package versions:
ii  gcc-2.95       2.95.4-0.01070 The GNU C compiler.
ii  binutils       2.11.90.0.7-2  The GNU assembler, linker and binary utiliti
ii  cpp-2.95       2.95.4-0.01070 The GNU C preprocessor.
ii  gcc            2.95.4-4       The GNU C compiler.
ii  libc6          2.2.3-6        GNU C Library: Shared libraries and Timezone

-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47  6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "But my God shall supply all your need according to his
      riches in glory by Christ Jesus."     Philippians 4:19




Reply to: