|
From: <sv...@va...> - 2012-05-15 21:04:40
|
philippe 2012-05-15 22:04:31 +0100 (Tue, 15 May 2012)
New Revision: 12564
Log:
Bypass gcc 4.4/4.5 compilation bug by moving -fomit-frame-pointer to Makefile.all.am
gcc 4.4 and 4.5 has a bug which causes miscompilation of mc_main.c:
args are not correctly given to VG_(am_munmap_valgrind).
This causes the secondary map entries to not be unmapped
(which can cause unlimited memory growth)
and/or causes the assert on VG_(am_munmap_valgrind) result to fail.
Removing the pragma optimize from mc_main.c and inserting it instead
in Makefile.all.am for x86 solves the gcc bug.
Modified files:
trunk/Makefile.all.am
trunk/memcheck/mc_main.c
Modified: trunk/memcheck/mc_main.c (+0 -9)
===================================================================
--- trunk/memcheck/mc_main.c 2012-05-13 23:58:09 +01:00 (rev 12563)
+++ trunk/memcheck/mc_main.c 2012-05-15 22:04:31 +01:00 (rev 12564)
@@ -50,15 +50,6 @@
#include "memcheck.h" /* for client requests */
-/* We really want this frame-pointer-less on all platforms, since the
- helper functions are small and called very frequently. By default
- on x86-linux, though, Makefile.all.am doesn't specify it, so do it
- here. Requires gcc >= 4.4, unfortunately. */
-#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
-# pragma GCC optimize("-fomit-frame-pointer")
-#endif
-
-
/* Set to 1 to do a little more sanity checking */
#define VG_DEBUG_MEMORY 0
Modified: trunk/Makefile.all.am (+4 -4)
===================================================================
--- trunk/Makefile.all.am 2012-05-13 23:58:09 +01:00 (rev 12563)
+++ trunk/Makefile.all.am 2012-05-15 22:04:31 +01:00 (rev 12564)
@@ -133,13 +133,13 @@
endif
AM_FLAG_M3264_X86_LINUX = @FLAG_M32@
-AM_CFLAGS_X86_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \
- $(AM_CFLAGS_BASE)
+AM_CFLAGS_X86_LINUX = @FLAG_M32@ @PREFERRED_STACK_BOUNDARY@ \
+ $(AM_CFLAGS_BASE) -fomit-frame-pointer
AM_CCASFLAGS_X86_LINUX = @FLAG_M32@ -g
AM_FLAG_M3264_AMD64_LINUX = @FLAG_M64@
-AM_CFLAGS_AMD64_LINUX = @FLAG_M64@ -fomit-frame-pointer \
- @PREFERRED_STACK_BOUNDARY@ $(AM_CFLAGS_BASE)
+AM_CFLAGS_AMD64_LINUX = @FLAG_M64@ @PREFERRED_STACK_BOUNDARY@ \
+ $(AM_CFLAGS_BASE) -fomit-frame-pointer
AM_CCASFLAGS_AMD64_LINUX = @FLAG_M64@ -g
AM_FLAG_M3264_PPC32_LINUX = @FLAG_M32@
|