From: | "MATSUDA, Daiki" <d(dot)matuda(at)gmail(dot)com> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #4743: potential bug between int and uint |
Date: | 2009-03-31 05:57:28 |
Message-ID: | 200903310557.n2V5vSNh030035@wwwmaster.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
The following bug has been logged online:
Bug reference: 4743
Logged by: MATSUDA, Daiki
Email address: d(dot)matuda(at)gmail(dot)com
PostgreSQL version: 8.3.6
Operating system: Linux
Description: potential bug between int and uint
Details:
diff -uNrp ./src/backend/storage/ipc/procarray.c.bk
./src/backend/storage/ipc/procarray.c
--- ./src/backend/storage/ipc/procarray.c.bk 2009-03-05
10:23:03.000000000 +0900
+++ ./src/backend/storage/ipc/procarray.c 2009-03-05
10:25:20.000000000 +0900
@@ -662,8 +662,8 @@ GetSnapshotData(Snapshot snapshot, bool
TransactionId xmax;
TransactionId globalxmin;
int index;
- int count = 0;
- int subcount = 0;
+ uint32 count = 0;
+ int32 subcount = 0;
Assert(snapshot != NULL);
because uint32 xcnt and int32 subxcnt in Snapshot structure, same as struct
SnapshotData, is declared. and
snapshot->xcnt = count;
snapshot->subxcnt = subcount;
are written in GetSnapshotData() in procarray.c. It is a potential bug.
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2009-03-31 08:37:58 | Re: BUG #4742: wrong resultset instead of syntax error |
Previous Message | Slava Moudry | 2009-03-31 00:34:49 | BUG #4742: wrong resultset instead of syntax error |