This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Consolidate link map sorting


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]