[PATCH] Consolidate link map sorting

Florian Weimer fweimer@redhat.com
Sat Nov 11 13:06:00 GMT 2017


On 11/09/2017 10:45 AM, Andreas Schwab wrote:
> +      /* Do not handle ld.so in secondary namespaces and object which
> +	 are not removed.  */
> +      if (thisp != thisp->l_real || thisp->l_idx == -1)
> +	goto skip;

Is this really safe to include in the processing when called from 
_dl_map_objects?

Then the comment is wrong, it should say:

“Do not handle ld.so in secondary namespaces and objects which are being 
removed.”

I assume thisp->l_idx == -1 means the object is undergoing removal, and 
_dl_new_object initializes l_idx to zero by allocating struct link_map 
using calloc.

Thanks,
Florian



More information about the Libc-alpha mailing list