[Cluster-devel] cluster/rgmanager ChangeLog src/clulib/alloc.c

fabbione at sourceware.org fabbione at sourceware.org
Thu Jun 21 18:39:09 UTC 2007


CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	fabbione at sourceware.org	2007-06-21 18:39:08

Modified files:
	rgmanager      : ChangeLog 
	rgmanager/src/clulib: alloc.c 

Log message:
	Fix build on ia64 by adding a temporary workaround and make sure to wrap
	STACKSIZE properly withing DEBUG.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/ChangeLog.diff?cvsroot=cluster&r1=1.47&r2=1.48
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/rgmanager/src/clulib/alloc.c.diff?cvsroot=cluster&r1=1.10&r2=1.11

--- cluster/rgmanager/ChangeLog	2007/06/14 19:08:57	1.47
+++ cluster/rgmanager/ChangeLog	2007/06/21 18:39:08	1.48
@@ -1,3 +1,9 @@
+2007-06-21 Fabio M. Di Nitto <fabbione at ubuntu.com>
+	* rgmanager/src/clulib/alloc.c: Undefine DEBUG when building on IA64.
+	The __builtin_address functionality should be taken from libunwind
+	but porting requires some work. For now use this workaround and
+	also make sure to wrap STACKSIZE withing DEBUG.
+
 2007-06-14 Lon Hohberger <lhh at redhat.com>
 	* include/resgroup.h: Fix size incompatibility on 32/64 bit mixed
 	clusters.  Put in stubs for intelligent handling of state sizes
--- cluster/rgmanager/src/clulib/alloc.c	2007/02/21 20:49:16	1.10
+++ cluster/rgmanager/src/clulib/alloc.c	2007/06/21 18:39:08	1.11
@@ -116,9 +116,11 @@
 #include <unistd.h>
 #include <sys/wait.h>
 
+#ifndef __ia64__
 #ifndef DEBUG
 #define DEBUG			/* Record program counter of malloc/calloc */
 #endif				/* or realloc call; print misc stuff out */
+#endif
 
 /* Tunable stuff XXX This should be external */
 #define PARANOID		/* Trade off a bit of space and speed for
@@ -667,7 +669,7 @@
 
 #define stack_pointer(n) \
 	(__builtin_frame_address(n)?__builtin_return_address(n):NULL)
-			
+
 #define assign_address(_ptr, _cnt) \
 { \
 	switch(_cnt) { \
@@ -806,10 +808,12 @@
 free(void *p)
 {
 	memblock_t *b;
+#ifdef DEBUG
 #ifdef STACKSIZE
 	void *pc = __builtin_return_address(0);
 	int x;
 #endif
+#endif
 
 	if (!p) {
 #if 0
@@ -862,11 +866,13 @@
 	}
 #endif
 
+#ifdef DEBUG
 #ifdef STACKSIZE
 	for (x = 0; x < STACKSIZE; x++)
 		b->mb_pc[x] = NULL;
 	b->mb_pc[0] = pc;
 #endif
+#endif
 
 	b->mb_state = ST_FREE;
 	b->mb_next = NULL;
@@ -981,11 +987,13 @@
 #ifdef PARANOID
 	int any = 0;
 	int x;
+#ifdef DEBUG
 #ifdef STACKSIZE
 #ifndef GDB_HOOK
 	int sp;
 #endif
 #endif
+#endif
 	memblock_t *b;
 
 	fflush(stdout);




More information about the Cluster-devel mailing list