Re: Fix bogus use of "long" in aset.c
David Rowley <dgrowleyml@gmail.com>
From: David Rowley <dgrowleyml@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2025-10-30T01:51:52Z
Lists: pgsql-hackers
On Thu, 30 Oct 2025 at 13:24, Tom Lane <tgl@sss.pgh.pa.us> wrote: > > The reason I left it an unsigned type was that the check is doing: if > > (chsize + ALLOC_CHUNKHDRSZ != blk_used), so we'd still catch this with > > an unsigned type, even if it wrapped due to going negative due to a > > bogus freeptr. Changing to a signed type would leave us with a few > > tests comparing signed to unsigned types. > > Yeah, that's fair. I'm content with what you have. Thanks for the reviews. I've pushed and backpatched to 13. David
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