[ElectricFence] Tell GCC not to recognize builtins when compiling efence.c

Petr Machata pmachata at fedoraproject.org
Fri Sep 10 11:42:44 UTC 2010


commit 97c16141abdfcc86e152f3849afe86976c5d809a
Author: Petr Machata <pmachata at redhat.com>
Date:   Fri Sep 10 13:42:14 2010 +0200

    Tell GCC not to recognize builtins when compiling efence.c

 ElectricFence-2.2.2-builtins.patch |   15 +++++++++
 ElectricFence-2.2.2-malloc.patch   |   61 ------------------------------------
 ElectricFence.spec                 |   11 +++++--
 3 files changed, 23 insertions(+), 64 deletions(-)
---
diff --git a/ElectricFence-2.2.2-builtins.patch b/ElectricFence-2.2.2-builtins.patch
new file mode 100644
index 0000000..efac99a
--- /dev/null
+++ b/ElectricFence-2.2.2-builtins.patch
@@ -0,0 +1,15 @@
+diff -up ElectricFence-2.2.2/Makefile\~ ElectricFence-2.2.2/Makefile
+--- ElectricFence-2.2.2/Makefile~	2010-09-10 13:24:35.000000000 +0200
++++ ElectricFence-2.2.2/Makefile	2010-09-10 13:28:36.000000000 +0200
+@@ -16,6 +16,9 @@ PACKAGE_SOURCE= README efence.3 Makefile
+ 
+ OBJECTS= efence.o page.o print.o
+ 
++efence.o: override CFLAGS += -fno-builtin-malloc -fno-builtin-calloc \
++  -fno-builtin-valloc -fno-builtin-realloc -fno-builtin-free
++
+ all:	libefence.a libefence.so.0.0 tstheap eftest
+ 	@ echo
+ 	@ echo "Testing Electric Fence."
+
+Diff finished.  Fri Sep 10 13:28:42 2010
diff --git a/ElectricFence.spec b/ElectricFence.spec
index f45fdf7..6d41f72 100644
--- a/ElectricFence.spec
+++ b/ElectricFence.spec
@@ -1,7 +1,7 @@
 Summary: A debugger which detects memory allocation violations
 Name: ElectricFence
 Version: 2.2.2
-Release: 28%{?dist}
+Release: 29%{?dist}
 License: GPLv2
 Group: Development/Tools
 URL: http://perens.com/FreeSoftware/ElectricFence/
@@ -16,7 +16,7 @@ Patch4: ElectricFence-2.2.2-madvise.patch
 Patch5: ElectricFence-mmap-size.patch
 Patch6: ElectricFence-2.2.2-banner.patch
 Patch7: ElectricFence-2.2.2-ef.patch
-Patch8: ElectricFence-2.2.2-malloc.patch
+Patch8: ElectricFence-2.2.2-builtins.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 %description
@@ -73,7 +73,12 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/*/*
 
 %changelog
-* Thu Sep  9 2010 root <pmachata at redhat.com> - 2.2.2-28
+* Fri Sep 10 2010 Petr Machata <pmachata at redhat.com> - 2.2.2-29
+- Tell GCC not to recognize builtins when compiling efence.c.
+- Resolves: #631316
+- Related: #632312
+
+* Thu Sep  9 2010 Petr Machata <pmachata at redhat.com> - 2.2.2-28
 - GCC optimizes out write to internalUse in call from
   allocateMoreSlots to malloc.  Rename malloc to __efence__malloc to
   pacify the trigger.  Later sneak the malloc symbol in with an alias.


More information about the scm-commits mailing list