Re: Fix bogus use of "long" in aset.c
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Rowley <dgrowleyml@gmail.com>
Cc: PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2025-10-29T23:55:12Z
Lists: pgsql-hackers
David Rowley <dgrowleyml@gmail.com> writes: > It turns out that AllocSetCheck() thinks "long" is a good datatype to > store the difference between 2 pointers. That's not going to work well > on 64-bit Windows as long is 32-bit. Ooops. Surprised we've not noticed this before. > I did also consider [u]intptr_t, but thought Size was better as that's > what chsize is. Seems like it's important that the value be signed, so maybe ssize_t? Or ptrdiff_t? regards, tom lane
Commits
-
Fix bogus use of "long" in AllocSetCheck()
- 7b955c2279f4 13.23 landed
- 86bd9497f87d 14.20 landed
- f3420e006ec0 15.15 landed
- cdc04a6c3399 16.11 landed
- bd6f986c9e0e 17.7 landed
- af3a79e0837d 18.1 landed
- 50eb4e118156 19 (unreleased) landed