Message ID | mvmlhkurbac.fsf@hawking.suse.de |
---|---|
State | New |
Headers | show |
On 22 Jan 2015 18:10, Andreas Schwab wrote: > GCC-5 translates a malloc call that is followed by memset on the return > value into a call to calloc, which will of course call our calloc > recursively. Prevent that by passing -fno-builtin. lgtm -mike
diff --git a/elf/Makefile b/elf/Makefile index e5b142c..7a1093b 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -1016,6 +1016,8 @@ $(objpfx)tst-audit1.out: $(objpfx)tst-auditmod1.so tst-audit1-ENV = LD_AUDIT=$(objpfx)tst-auditmod1.so $(objpfx)tst-audit2.out: $(objpfx)tst-auditmod1.so +# Prevent GCC-5 from translating a malloc/memset pair into calloc +CFLAGS-tst-audit2.c += -fno-builtin tst-audit2-ENV = LD_AUDIT=$(objpfx)tst-auditmod1.so $(objpfx)tst-audit9: $(libdl)