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]

Avoiding compiler-induced infinite recursion in memset w/ GCC 4.8?


Hey, all -

I ran into an issue with building EGLIBC 2.17 with GCC 4.8 -- it looks
like GCC is recognizing the cleanup loop at the end of string/memset.c
as something it can replace with a call to memset, and so we get an
infinite recursive loop.

Is there an already-existing solution to this problem?  I'd be
surprised if I'm the first person to run into this, but I can't
immediately find any references to it by searching.  From what I can
see in string/Makefile, we only add -fno-builtin to test files.

Presumably we need to compile memset with -fno-builtin somehow -- and
if this is solved in a current GLIBC, I need to backport it to our
EGLIBC branch.

(In my case, one exacerbating factor is that I'm building for
powerpc64, and the memset there is defined in
sysdeps/powerpc/powerpc64/rtld-memset.c, which #includes
string/memset.c, but may not have the same flags applied or
something.)

- Brooks


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