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: [RFC] Prevent tailcall optimizations of libdl functions


On Wed, 25 Jan 2017, Rich Felker wrote:

> FWIW this technique is non-conforming, at least for any standard
> functions it's used on, since it breaks pointer equality. A conforming
> program can evaluate p1==p2, where p1=dlsym is assigned in one dso and
> p2=dlsym is assigned in another, and must see equality on a conforming
> implementation. As such I think this hack needs to be removed from
> other functions like stat.

A conforming program does not use shared libraries other than those 
provided by the system and POSIX does not define any way to build shared 
libraries.  If shared libraries are supported as an extension, ISO C and 
POSIX impose no requirements on how symbol resolution semantics when that 
feature is used might differ from symbol resolution semantics when only 
standard features are used.

(I put stat in the category of "do this differently if we move to 
libc.so.7", i.e. replace the very old versioning mechanism by normal 
symbol versioning if making such an (unlikely) global ABI transition.)

-- 
Joseph S. Myers
joseph@codesourcery.com


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