This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 1/3] New string function explicit_bzero (from OpenBSD).
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: Zack Weinberg <zackw at panix dot com>, <libc-alpha at sourceware dot org>
- Date: Thu, 6 Oct 2016 15:49:12 +0000
- Subject: Re: [PATCH 1/3] New string function explicit_bzero (from OpenBSD).
- Authentication-results: sourceware.org; auth=none
- References: <20160915130507.20993-1-zackw@panix.com> <20160915130507.20993-2-zackw@panix.com> <de350d8e-8634-d716-6ddc-364118cbe766@redhat.com>
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++.)
--
Joseph S. Myers
joseph@codesourcery.com