[Patch] Fix cycle detection and initialization order in dynamic loader
Mike Frysinger
vapier@gentoo.org
Wed Jun 13 17:07:00 GMT 2012
On Wednesday 13 June 2012 12:32:10 Jeff Law wrote:
> On 06/12/2012 11:44 AM, Roland McGrath wrote:
> >> http://sourceware.org/bugzilla/show_bug.cgi?id=13882 - contains a
> >> patch.
> >
> > In fact it contains pointers to archives of this list, where Jeff
> > posted patches.
> >
> >> Last time we discussed the bugs on the mailing list, Roland
> >> mentioned that he wanted to review this later. Roland, could you do
> >> this now, please? Or anybody else volunteering to review this bug
> >> in the dynamic linker?
> >
> > I don't recall saying that and I don't think I have especially great
> > context on this stuff. I think Jeff should just restart the review
> > by posting the minimal patch he wants to get in.
>
> When sorting objects to ensure proper initialization order we terminate
> the sort too early resulting in incorrect initialization order for DSOs.
>
> Additionally, the sorting code is limited in the number of DSOs it can
> properly handle because it using an array of chars for counts.
nice work. so by going to uint16_t, the new ldso limit is 65536 rather than
127 ? should we add a pathological assert when that limit is hit ?
is it possible to add the tests to the tree to keep things from regressing ?
seems like a corner case that is easy to break again :(.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20120613/be6d0c8a/attachment.sig>
More information about the Libc-alpha
mailing list