This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Avoiding compiler-induced infinite recursion in memset w/ GCC 4.8?
- From: Brooks Moses <bmoses at google dot com>
- To: libc-alpha at sourceware dot org
- Date: Tue, 16 Jul 2013 14:23:53 -0700
- Subject: 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