Skip to content
Commit 09cd1f57 authored by Jakub Jelinek's avatar Jakub Jelinek Committed by Ulrich Drepper
Browse files

Fix STB_GNU_UNIQUE handling for > 30 unique symbols.

There were several issues when the initial 31 entries hashtab filled up.
size * 3 <= tab->n_elements is always false, table can't have more elements
than its size.  I assume from libiberty/hashtab.c this meant to be check for
3/4 full.  Even after fixing that, _dl_higher_prime_number (31) apparently
returns 31, only _dl_higher_prime_number (32) returns 61.  And, size
variable wasn't updated during reallocation, which means during reallocation
the insertion of the new entry was done into a wrong spot.

All this lead to a hang in ld.so, because a search with n_elements 31 size
31 wouldn't ever terminate.
parent 009a69f0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment