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.
This commit is contained in:
Tom Lane 2003-03-31 20:33:09 +00:00
parent 40faf433b0
commit 28afe6f8ef

View 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;