[PATCH] Fix dynamic linker

Jakub Jelinek jakub@redhat.com
Thu Sep 14 09:08:00 GMT 2000


Hi!

This typo was causing JDK to segfault (well, obviously, because the while
loop goes until *scope == NULL, then it went back to the while condition and
dereferenced it to look up r_nlist).
_dl_lookup_versioned_symbol_skip has if there, not while.

2000-09-14  Jakub Jelinek  <jakub@redhat.com>

	* elf/dl-lookup.c (_dl_lookup_symbol_skip): Fix a typo.

--- libc/elf/dl-lookup.c.jj	Fri Sep  1 11:37:58 2000
+++ libc/elf/dl-lookup.c	Thu Sep 14 17:48:01 2000
@@ -306,7 +306,7 @@ _dl_lookup_symbol_skip (const char *unde
   for (i = 0; (*scope)->r_duplist[i] != skip_map; ++i)
     assert (i < (*scope)->r_nduplist);
 
-  while (i >= (*scope)->r_nlist
+  if (i >= (*scope)->r_nlist
 	 || ! do_lookup (undef_name, hash, *ref, &current_value, *scope, i,
 			 skip_map, 0, 0))
     while (*++scope)

	Jakub


More information about the Libc-hacker mailing list