[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: HelloWorld.c CRASHES when moved from FC6 to FC3!!
From: |
Paul Pluzhnikov |
Subject: |
Re: HelloWorld.c CRASHES when moved from FC6 to FC3!! |
Date: |
Thu, 08 Feb 2007 19:04:58 -0800 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, linux) |
Ignoramus25565 <ignoramus25565@NOSPAM.25565.invalid> writes:
> Seems to work.
I've reproduced the crash when compiling "int main() { return 0; }"
on FC6 and running it on FC4.
The reason dynamic linker crashes is that a.out doesn't have
DT_HASH dynamic tag at all, and FC4 ld-linux.so.2 expects it (and
divides by l_nbuckets (zero) without checking):
#0 0x00991898 in dl_main (phdr=0x8048034, phnum=224, user_entry=0xbffff64c) at
rtld.c:1360
1360 for (symidx = main_map->l_buckets[0x6c994f %
main_map->l_nbuckets];
Compiling the same code on FC6 with '-Wl,--hash-style=sysv' fixes
that crash.
Still you are on dangerous ground -- your exe may have subtle
and non-trivial bugs introduced by "backward" compilation
environment. Let's hope you have adequate regression tests ...
> Also, interestingly, not only the app used to fail witi SIGFPE, but
> also "ldd app".
That's not surprising at all -- "ldd" is a simple shell script,
which tells ld-linux.so.2 to print libraries instead of actually
loading them. The root cause of the crash is the same in both cases:
missing DT_HASH dynamic tag.
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
- HelloWorld.c CRASHES when moved from FC6 to FC3!!, troubled_gcc_user, 2007/02/08
- Re: HelloWorld.c CRASHES when moved from FC6 to FC3!!, Robert Heller, 2007/02/08
- Re: HelloWorld.c CRASHES when moved from FC6 to FC3!!, troubled_gcc_user, 2007/02/08
- Re: HelloWorld.c CRASHES when moved from FC6 to FC3!!, Robert Heller, 2007/02/08
- Re: HelloWorld.c CRASHES when moved from FC6 to FC3!!, troubled_gcc_user, 2007/02/08
- Re: HelloWorld.c CRASHES when moved from FC6 to FC3!!, Robert Heller, 2007/02/08
- Re: HelloWorld.c CRASHES when moved from FC6 to FC3!!, Paul Pluzhnikov, 2007/02/08
- Re: HelloWorld.c CRASHES when moved from FC6 to FC3!!, Robert Heller, 2007/02/08
- Re: HelloWorld.c CRASHES when moved from FC6 to FC3!!, Paul Pluzhnikov, 2007/02/08
- Re: HelloWorld.c CRASHES when moved from FC6 to FC3!!, Ignoramus25565, 2007/02/08
- Re: HelloWorld.c CRASHES when moved from FC6 to FC3!!,
Paul Pluzhnikov <=
- Re: HelloWorld.c CRASHES when moved from FC6 to FC3!!, Ignoramus25565, 2007/02/08
- Re: HelloWorld.c CRASHES when moved from FC6 to FC3!!, Paul Pluzhnikov, 2007/02/08
- Re: HelloWorld.c CRASHES when moved from FC6 to FC3!!, Ignoramus25565, 2007/02/08
- Re: HelloWorld.c CRASHES when moved from FC6 to FC3!!, Ignoramus25565, 2007/02/08