This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/11577] New: LD_DEBUG=versions causes segfault on binaries with unsatisfied version dependencies


$ ./app
./app: /usr/lib/libcurl-gnutls.so.4: no version information available (required by ./app)
$ LD_DEBUG=versions ./app
      4646:	checking for version `GLIBC_2.2' in file /lib/librt.so.1 [0] required by file ./app [0]
      4646:	checking for version `GLIBC_2.0' in file /lib/libdl.so.2 [0] required by file ./app [0]
      4646:	checking for version `GLIBC_2.1' in file /lib/libdl.so.2 [0] required by file ./app [0]
      4646:	checking for version `GLIBC_2.1' in file /lib/libm.so.6 [0] required by file ./app [0]
      4646:	checking for version `GLIBC_2.0' in file /lib/libm.so.6 [0] required by file ./app [0]
      4646:	checking for version `libmysqlclient_15' in file /usr/lib/mysql/libmysqlclient.so.15 [0] required 
by file ./app [0]
      4646:	checking for version `CURL_GNUTLS_3' in file /usr/lib/libcurl-gnutls.so.4 [0] required by file ./
app [0]
Segmentation fault

gdb shows:

Program received signal SIGSEGV, Segmentation fault.
0x002a89a3 in strlen () from /lib/ld-linux.so.2
(gdb) bt
#0  0x002a89a3 in strlen () from /lib/ld-linux.so.2
#1  0x002a1e16 in _dl_debug_vdprintf () from /lib/ld-linux.so.2
#2  0x002a1efe in _dl_debug_printf () from /lib/ld-linux.so.2
#3  0x002a118f in _dl_signal_cerror () from /lib/ld-linux.so.2
#4  0x002a2162 in match_symbol () from /lib/ld-linux.so.2
#5  0x002a2522 in _dl_check_map_versions () from /lib/ld-linux.so.2
#6  0x002a284d in _dl_check_all_versions () from /lib/ld-linux.so.2
#7  0x0029559d in version_check_doit () from /lib/ld-linux.so.2
#8  0x002a0dce in _dl_receive_error () from /lib/ld-linux.so.2
#9  0x0029658f in dl_main () from /lib/ld-linux.so.2
#10 0x002a6ffb in _dl_sysdep_start () from /lib/ld-linux.so.2
#11 0x002942b8 in _dl_start () from /lib/ld-linux.so.2
#12 0x00293817 in _start () from /lib/ld-linux.so.2

This is on CentOS 5.4 i686 with glibc 2.5, but judging from the code bug is still present in git trunk.
Patch:

diff --git elf/dl-version.c elf/dl-version.c
index c59a6c3..3df8ebe 100644
--- elf/dl-version.c
+++ elf/dl-version.c
@@ -169,7 +169,7 @@ no version information available (required by ", name, ")");
   result = 1;
  call_cerror:
   _dl_signal_cerror (0, map->l_name[0] ? map->l_name : rtld_progname,
-                    NULL, errstring);
+                    N_("version error"), errstring);
   return result;
 }
 
PS: And it would have been really helpful if patch from bug #794 was committed thus preventing 
crash..

-- 
           Summary: LD_DEBUG=versions causes segfault on binaries with
                    unsatisfied version dependencies
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: ygrek at autistici dot org
                CC: glibc-bugs at sources dot redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=11577

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]