TestConfiguration returns int, not bool. This mistake is relatively
authorTom Lane <[email protected]>
Mon, 31 Mar 2003 20:32:50 +0000 (20:32 +0000)
committerTom Lane <[email protected]>
Mon, 31 Mar 2003 20:32:50 +0000 (20:32 +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 f95d2bebf71141fc659b1b2cf26e5feffea9c598..ca5cf256d07762e4aadd93dcba0c1ff34bf8c14d 100644 (file)
@@ -47,7 +47,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,
@@ -301,7 +301,7 @@ DeadLockCheckRecurse(PGPROC *proc)
  * number of soft edges.
  *--------------------
  */
-static bool
+static int
 TestConfiguration(PGPROC *startProc)
 {
        int                     softFound = 0;