Commit 7cd30e15 authored by Tom Lane's avatar Tom Lane

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.
parent 80597fd9
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* *
* *
* IDENTIFICATION * 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: * Interface:
* *
...@@ -64,7 +64,7 @@ typedef struct ...@@ -64,7 +64,7 @@ typedef struct
static bool DeadLockCheckRecurse(PGPROC *proc); static bool DeadLockCheckRecurse(PGPROC *proc);
static bool TestConfiguration(PGPROC *startProc); static int TestConfiguration(PGPROC *startProc);
static bool FindLockCycle(PGPROC *checkProc, static bool FindLockCycle(PGPROC *checkProc,
EDGE *softEdges, int *nSoftEdges); EDGE *softEdges, int *nSoftEdges);
static bool FindLockCycleRecurse(PGPROC *checkProc, int depth, static bool FindLockCycleRecurse(PGPROC *checkProc, int depth,
...@@ -338,7 +338,7 @@ DeadLockCheckRecurse(PGPROC *proc) ...@@ -338,7 +338,7 @@ DeadLockCheckRecurse(PGPROC *proc)
* number of soft edges. * number of soft edges.
*-------------------- *--------------------
*/ */
static bool static int
TestConfiguration(PGPROC *startProc) TestConfiguration(PGPROC *startProc)
{ {
int softFound = 0; int softFound = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment