[patch] Reduce ridiculous stack use in _dl_map_object_deps
Roland McGrath
roland@hack.frob.com
Mon Oct 31 21:28:00 GMT 2011
> + {
> + size_t new_size;
> +
> + /* 16-align so extend_alloca has a chance to re-use the space.
> + Note that extend_alloca is broken for recent versions of GCC
> + on x86: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50938 */
> + new_size = (l->l_ldnum * sizeof (struct link_map *) + 15) & ~15;
Use an initialized defn.
> + if (new_size > needed_space_bytes)
> + needed_space
> + = extend_alloca (needed_space, needed_space_bytes, new_size);
> +
> + needed = needed_space;
Something has to update needed_space_bytes.
More information about the Libc-alpha
mailing list