This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
glibc-2.3.1: Segfault when nis compiled with "- static"
- From: "Srikrishnan Sundararajan" <srikrishnan at in dot ibm dot com>
- To: libc-alpha at sources dot redhat dot com
- Date: Wed, 26 Mar 2003 22:23:52 +0530
- Subject: glibc-2.3.1: Segfault when nis compiled with "- static"
It is the same problem as in the following post:
static binary doing getpwuid() or such
+ "passwd: compat" in /etc/nsswitch.conf
+ "- at SOMEGROUP::::::" in /etc/passwd
= crash.
I am used my compiled version of glibc-2.3.1 on Linux/i386. I am compling
with "-static" and executing my program on the same machine(NIS client with
compat mode). The test program just calls getpwuid, I get a segfault.
I have not be able to see any proper solution while looking at the previous
posts. Upon using gdb, I found that DB_LOOKUP_FCT is called. Here
nss_compat is loaded using dl_open and the address for the function is
nss_compat_getpwuid_r is looked up (nss_lookup_function -> lib_dlsym ->
dl_sym).
Then DL_CALL_FCT is called with the function address returned. This in turn
calls dl_mcount from elf/dl-profstub.c:42. Soon, segfault occurs.
/proc/<pid>/maps shows that the nss_compat has been mapped around the
place for which I get "??" in backtrace after the segfault.
1. Is this a known problem, has it been fixed?
2. I am compling as well as and executing the program on the same machine
with the same glibc-2.3.1?
Any other help or suggestions in zeroing in on the problem would be
helpful.
Thanks,
Srikrishnan