Re: debugging segfault before main.

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

 



On Fri, Jul 18, 2008 at 4:10 AM, Karl Hiramoto <karl@xxxxxxxxxxxx> wrote:
> Hi all,
>
> I'm looking for suggestions how to debug a segfault i have before main().
> I'm  thinking now that  this is probably coming from one of the ten shared
> libraries i link to, but i don't know which one.    I recently upgraded from
> kernel 2.6.16, uclibc 0.28, gcc 3.4.6   to   kernel 2.6.25, uclibc 0.29, gcc
> 4.2.4 and this problem started.

This is, as usual, most probably a bug in your code.  Static ctors run
before main starts and their order is not well-defined across
compilation units.  Perhaps there is a dependency and things aren't
getting initialized in the same order as with the last system setup.

If you can't get a dump, eliminate the code/initialization that may
take place before start, and see if you at least get to the program
entry point.

-- 
Andrew Bell
andrew.bell.ia@xxxxxxxxx

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux