[PATCH] Fix for localalias.c bug
Ulrich Drepper
drepper@redhat.com
Sat Oct 14 18:57:00 GMT 2000
Jakub Jelinek <jakub@redhat.com> writes:
> Below are two possible solutions for a pretty old bug in
> localealias.c which is visible under ElectricFence: If the
> string_space pool is too small, it is realloced, but realloc does
> not guarantee it will return the same pointer as was passed to it,
> but we already stored many string pointers to the old pool into the
> map array.
Good catch. I've applied your patch P2. It's I think easier but the
main argument is that the code to free the buffers does not have to be
changed. The only thing I changed is adding a __builtin_expect().
Thanks,
--
---------------. ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Red Hat `--' drepper at redhat.com `------------------------
More information about the Libc-hacker
mailing list