postgres.git / summary / log / commit / refs
commit 28afe6f8ef79a1b06abcf7d7c86f0eb179a71fb3
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: Mon Mar 31 20:33:09 2003 +0000
First released in: 7.4, 7.2.5, 7.3.3
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 70867b65642..22c61aedc61 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.8 2001/10/28 06:25:50 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/deadlock.c,v 1.8.2.1 2003/03/31 20:33:09 tgl Exp $
*
* Interface:
*
@@ -47,7 +47,7 @@ typedef struct
static bool DeadLockCheckRecurse(PROC *proc);
-static bool TestConfiguration(PROC *startProc);
+static int TestConfiguration(PROC *startProc);
static bool FindLockCycle(PROC *checkProc,
EDGE *softEdges, int *nSoftEdges);
static bool FindLockCycleRecurse(PROC *checkProc,
@@ -299,7 +299,7 @@ DeadLockCheckRecurse(PROC *proc)
* number of soft edges.
*--------------------
*/
-static bool
+static int
TestConfiguration(PROC *startProc)
{
int softFound = 0;
[parent: 40faf433b0ff]