rpms/pixman/F-12 0001-region-Enable-or-disable-fatal-errors-and-selfchecks.patch, NONE, 1.1 pixman.spec, 1.44, 1.45
Soren Sandmann Pedersen
ssp at fedoraproject.org
Fri Dec 11 19:44:01 UTC 2009
Author: ssp
Update of /cvs/pkgs/rpms/pixman/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv20563
Modified Files:
pixman.spec
Added Files:
0001-region-Enable-or-disable-fatal-errors-and-selfchecks.patch
Log Message:
Disable asserts
0001-region-Enable-or-disable-fatal-errors-and-selfchecks.patch:
pixman-region.c | 42 ++++++++++++++++++++++++++++++++++++------
1 file changed, 36 insertions(+), 6 deletions(-)
--- NEW FILE 0001-region-Enable-or-disable-fatal-errors-and-selfchecks.patch ---
>From 54bc3ee64e5582a348cb0e48b3c54b1680ba7937 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=B8ren=20Sandmann=20Pedersen?= <sandmann at redhat.com>
Date: Fri, 11 Dec 2009 11:14:19 -0500
Subject: [PATCH] region: Enable or disable fatal errors and selfchecks based on version number
For stable releases, assertions and selfchecks are turned off.
For unstable releases, assertions and selfchecks are turned on.
For random git checkouts, assertions are on, but selfchecks are off.
---
pixman/pixman-region.c | 41 ++++++++++++++++++++++++++++++++++++-----
1 files changed, 36 insertions(+), 5 deletions(-)
diff --git a/pixman/pixman-region.c b/pixman/pixman-region.c
index f88955f..df38ea0 100644
--- a/pixman/pixman-region.c
+++ b/pixman/pixman-region.c
@@ -66,9 +66,42 @@
#define GOOD_RECT(rect) ((rect)->x1 < (rect)->x2 && (rect)->y1 < (rect)->y2)
#define BAD_RECT(rect) ((rect)->x1 > (rect)->x2 || (rect)->y1 > (rect)->y2)
-#define noPIXMAN_REGION_LOG_FAILURES
+/* Turn on debugging depending on what type of release this is
+ */
-#if defined PIXMAN_REGION_LOG_FAILURES || defined PIXMAN_REGION_DEBUG
+#if ((PIXMAN_VERSION_MICRO % 2) == 1)
+/* Random git checkout.
+ *
+ * Those are often used for performance work, so we don't turn on the
+ * full self-checking, but we do turn on the asserts.
+ */
+# define FATAL_BUGS
+# define noSELF_CHECKS
+#elif ((PIXMAN_VERSION_MINOR % 2) == 0)
+/* Stable release.
+ *
+ * We don't want assertions because the X server should stay alive
+ * if possible. We also don't want self-checks for performance-reasons.
+ */
+# define noFATAL_BUGS
+# define noSELF_CHECKS
+#else
+/* Development snapshot.
+ *
+ * These are the things that get shipped in development distributions
+ * such as Rawhide. We want both self-checking and fatal assertions
+ * to catch as many bugs as possible.
+ */
+# define FATAL_BUGS
+# define SELF_CHECKS
+#endif
+
+#ifndef FATAL_BUGS
+# define assert(expr)
+# define abort()
+#endif
+
+#ifdef SELF_CHECKS
static void
log_region_error (const char *function, const char *message)
@@ -83,9 +116,7 @@ log_region_error (const char *function, const char *message)
"Set a breakpoint on 'log_region_error' to debug\n\n",
function, message);
-#if defined PIXMAN_REGION_DEBUG
- abort ();
-#endif
+ abort (); /* This is #defined away unless FATAL_BUGS is defined */
n_messages++;
}
--
1.6.5.2
Index: pixman.spec
===================================================================
RCS file: /cvs/pkgs/rpms/pixman/F-12/pixman.spec,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -p -r1.44 -r1.45
--- pixman.spec 28 Sep 2009 13:52:56 -0000 1.44
+++ pixman.spec 11 Dec 2009 19:44:00 -0000 1.45
@@ -15,6 +15,8 @@ URL: http://cgit.freedesktop.
Source0: http://xorg.freedesktop.org/archive/individual/lib/%{name}-%{version}.tar.bz2
Source1: make-pixman-snapshot.sh
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Patch0: 0001-region-Enable-or-disable-fatal-errors-and-selfchecks.patch
+
# BuildRequires: automake autoconf libtool pkgconfig
@@ -32,6 +34,7 @@ Development library for pixman.
%prep
%setup -q
+%patch0 -p1 -b .disable-asserts
%build
%configure --disable-static
@@ -61,6 +64,9 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/pkgconfig/pixman-1.pc
%changelog
+* Fri Dec 11 2009 Soren Sandmann <ssp at redhat.com> - 0.16.2-2
+- Add patch to disable asserts in stable releases.
+
* Mon Sep 28 2009 Soren Sandmann <ssp at redhat.com> - 0.16.2-1
- pixman 0.16.2
More information about the fedora-extras-commits
mailing list