Avoiding compiler-induced infinite recursion in memset w/ GCC 4.8?
Brooks Moses
bmoses@google.com
Tue Jul 16 21:24:00 GMT 2013
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
More information about the Libc-alpha
mailing list