This is the mail archive of the 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] deprecate libnsl/libnss_*

On 04/08/2016 07:39 PM, Roland McGrath wrote:
>> If it's visible to an application what libraries were loaded by an NSS 
>> module, I'd consider that to be a bug (bug 16881, I think) - NSS modules 
>> should be loaded in such a way that this is not visible.
> Bug 16881 is not entirely clear on what it's talking about.  On the face of
> it, it sounds like a problem that could only arise if something were using
> RTLD_GLOBAL.  If that's all it's talking about, then that should already
> not be an issue.

gdb has a timeval_add symbol, and none of the direct dependencies 
of gdb define a conflicting symbol.  However, gdb calls gethostbyname, 
and that, due to some internal implementation detail of glibc, 
dynamically loads a module which does have a global symbol of the 
same name, which ended up unintentionally overridden by gdb's symbol.

The bug was about seeing if it'd be possible for internal
details of the implementation, and here I'm calling implementation/libnss
loaded modules as such, not to cause namespace pollution in symbols
not in the implementation namespace, nor reserved by the
relevant standards, vs applications having to avoid the issue
themselves, by renaming their symbols.

AFAICS, gdb has not renamed the symbol, and I'm not the one
who tripped on it in the first place, so I'm not sure
whether this particular instance of the bug was fixed some
other way.

Let me know whether it's still not clear.

Pedro Alves

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