[PATCH] Fix ldconfig
Jakub Jelinek
jakub@redhat.com
Sun Dec 29 04:56:00 GMT 2002
Hi!
tls was given hwcap 0x8000000000000000 but add_to_cache relied on
this never set in hwcap. The following patch fixes the endless loop in
ldconfig.
2002-12-29 Jakub Jelinek <jakub@redhat.com>
* elf/cache.c (add_to_cache): Don't loop forever with 1ULL << 63 set
in hwcap.
--- libc/elf/cache.c.jj 2002-09-24 13:00:06.000000000 +0200
+++ libc/elf/cache.c 2002-12-29 12:28:12.000000000 +0100
@@ -475,7 +475,7 @@ add_to_cache (const char *path, const ch
new_entry->bits_hwcap = 0;
/* Count the number of bits set in the masked value. */
- for (i = 0; (~((1ULL << i) - 1) & hwcap) != 0; ++i)
+ for (i = 0; (~((1ULL << i) - 1) & hwcap) != 0 && i < 64; ++i)
if ((hwcap & (1ULL << i)) != 0)
++new_entry->bits_hwcap;
Jakub
More information about the Libc-hacker
mailing list