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 1/3] New string function explicit_bzero (from OpenBSD).


On 10/06/2016 05:49 PM, Joseph Myers wrote:
On Thu, 6 Oct 2016, Florian Weimer wrote:

On 09/15/2016 03:05 PM, Zack Weinberg wrote:
+/* As bzero, but the compiler will not delete a call to this
+   function, even if S is dead after the call.  */
+extern void explicit_bzero (void *__s, size_t __n) __THROW __nonnull ((1));

I would like to redirect callers to __explicit_bzero, so that shared objects
do not accidentally pick up an implementation of explicit_bzero which may or
may not do the right thing.

Do you have a proposed rule for when to do such redirection?  I don't
think it should be normal to do it; any library function could potentially
be affected by applications defining their own function with that name.

(Exporting reserved function names at public versions makes sense when
there is a use for those functions in contexts with namespace issues, such
as libgcc or libstdc++.)

Thanks for asking.  I started a new thread for this topic:

  <https://sourceware.org/ml/libc-alpha/2016-10/msg00294.html>

Florian


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