Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 05 May 2015 02:13:33 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 199943] document guarantee provided by dl_iterate_phdr(3) callback order
Message-ID:  <bug-199943-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=199943

            Bug ID: 199943
           Summary: document guarantee provided by dl_iterate_phdr(3)
                    callback order
           Product: Base System
           Version: 11.0-CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: misc
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: emaste@freebsd.org

A number of posts found on e.g. http://stackoverflow.com/ and elsewhere ask
about the order of objects returned by dl_iterate_phdr. Those questions are
typically targeted at Linux, but the question is equally applicable to FreeBSD.
The question usually arises from a desire to know which is the main executable.

In practice the executable is passed to the first callback invocation, but
there is currently no guarantee that this will not change.  We should choose
one of:

1) Document this and add a test so that it remains the case
2) Caution that the order of objects is not guaranteed, and consumers should
not rely on a particular order

Equivalent issue for Linux (but probably not in the correct bug tracker):
https://bugzilla.kernel.org/show_bug.cgi?id=94141

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-199943-8>