From 7cd30e1590c7d6b07d00da4170eaae094ab81bbd Mon Sep 17 00:00:00 2001
From: Tom Lane <tgl@sss.pgh.pa.us>
Date: Mon, 31 Mar 2003 20:32:29 +0000
Subject: [PATCH] TestConfiguration returns int, not bool.  This mistake is
 relatively harmless on signed-char machines but would lead to core dump in
 the deadlock detection code if char is unsigned.  Amazingly, this bug has
 been here since 7.1 and yet wasn't reported till now.  Thanks to Robert
 Bruccoleri for providing the opportunity to track it down.

---
 src/backend/storage/lmgr/deadlock.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/backend/storage/lmgr/deadlock.c b/src/backend/storage/lmgr/deadlock.c
index 48d3efc37dd..37cd73eaf13 100644
--- a/src/backend/storage/lmgr/deadlock.c
+++ b/src/backend/storage/lmgr/deadlock.c
@@ -12,7 +12,7 @@
  *
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/storage/lmgr/deadlock.c,v 1.19 2003/02/19 23:41:15 momjian Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/storage/lmgr/deadlock.c,v 1.20 2003/03/31 20:32:29 tgl Exp $
  *
  *	Interface:
  *
@@ -64,7 +64,7 @@ typedef struct
 
 
 static bool DeadLockCheckRecurse(PGPROC *proc);
-static bool TestConfiguration(PGPROC *startProc);
+static int	TestConfiguration(PGPROC *startProc);
 static bool FindLockCycle(PGPROC *checkProc,
 			  EDGE *softEdges, int *nSoftEdges);
 static bool FindLockCycleRecurse(PGPROC *checkProc, int depth,
@@ -338,7 +338,7 @@ DeadLockCheckRecurse(PGPROC *proc)
  * number of soft edges.
  *--------------------
  */
-static bool
+static int
 TestConfiguration(PGPROC *startProc)
 {
 	int			softFound = 0;
-- 
GitLab