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] Remove unnecessary IFUNC dispatch for __memset_chk.

On Tue, Aug 11, 2015 at 12:09:55PM -0700, H.J. Lu wrote:
> On Tue, Aug 11, 2015 at 12:03 PM, OndÅej BÃlka <> wrote:
> > On Tue, Aug 11, 2015 at 10:00:39AM -0700, H.J. Lu wrote:
> >> On Tue, Aug 11, 2015 at 1:04 AM, OndÅej BÃlka <> wrote:
> >> >>
> >> > Simple, we return null. Following causes segmentation fault.
> >> >
> >> > gcc -fPIC -shared x.c -o
> >> > void foo (int x) __attribute__ ((ifunc ("resolve_foo")));
> >> >
> >> > int foo_impl(int x)
> >> ^^^^^^^^^^^^^^^^^^^^
> >>
> >> This should be static.
> >>
> > Didn't know its explicitly forbidden to use nonstatic resolvers. Do we document that requirement somewhere?
> > If not then we should add it to documentation.
> It makes no senses for IFUNC selector to return the address of
> a global function, which may be preempted at run-time.
While dubious its still either a bug or user error. So we should clarify
that user error or somebody will in future enter this issue into

While dubious some user could decide its good idea to save space by 
packing avx2 variant of function on separate library that overrides 
resolver when present and replace that by dummy library when user's 
processor doesn't have avx2.

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