This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
LD_AUDIT implementation causing process segfaulting
- From: Jiri Olsa <olsajiri at gmail dot com>
- To: GNU C Library <libc-alpha at sources dot redhat dot com>
- Date: Thu, 25 Jan 2007 01:13:20 +0100
- Subject: LD_AUDIT implementation causing process segfaulting
Hi,
after several unsuccessful attempts to commit a bug (bugzilla report me
the "bug 70907")
I'm writing here, hopefully this is the right place :).
There's a bug in libc in the "sysdeps/i386/dl-trampoline.S". The
_dl_runtime_profile function makes process segfaulting. Under some
conditions the 'edi' and 'esi' registers are restored to wrong values.
IMHO this could be fixed like this:
Index: sysdeps/i386/dl-trampoline.S
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/i386/dl-trampoline.S,v
retrieving revision 1.2
diff -r1.2 dl-trampoline.S
116d115
< andl $0xfffffff0, %edi # Align stack
edi and esi registers are pushed on stack before it is alligned. In case
it is really aligned those registers wont be restored properly. I tried
the fix and it is working for me. I dont know the reason for alligning
the stack here, so hopefully I'm not missing something... :)
I can reproduce this running the /bin/ls with LD_AUDIT set to library
providing the interface to pltexit.
I'm running the 2.4 version, but seems it is an issue in current sources
as well.
regards
Jiri Olsa