bug-glibc
[Top][All Lists]
Advanced

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

glibc-2.3.1: Segfault when nis compiled with "- static"


From: Srikrishnan Sundararajan
Subject: glibc-2.3.1: Segfault when nis compiled with "- static"
Date: Wed, 26 Mar 2003 22:38:01 +0530

It is the same problem as in the following post:  " static binary doing
getpwuid() or such
      + "passwd: compat" in /etc/nsswitch.conf        + "address@hidden::::::"
in /etc/passwd    = crash."

(I'd posted this now in glibc-alpha, but thought bug-glibc would be the
appropriate mailing list. I've not subscribed this list, please copy me any
responses)

I have compiled and am using 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 in
glibc-2.3.1/nss/getXXbyYY_r.c 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]