TestConfiguration returns int, not bool. This mistake is relatively
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 31 Mar 2003 20:33:09 +0000 (20:33 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 31 Mar 2003 20:33:09 +0000 (20:33 +0000)
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

index 70867b65642cf58e89424e390f46f3c89bdd2946..22c61aedc61d77143b50475dd70d8b5678472304 100644 (file)
@@ -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;