model-writtenrun 1704 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- David Rowley reported false memory-context warnings from a large allocation on 64-bit Windows, where long is only 32 bits, and proposed replacing three AllocSetCheck() variables with Size to match chsize in #1.
- Michael Paquier endorsed Size and the consistency argument in #2, while Tom Lane questioned whether the checks required a signed type such as ssize_t or ptrdiff_t in #3.
- David explained that the equality check would still detect a corrupted freeptr after unsigned wraparound and that Size avoided mixed signed and unsigned comparisons in #4.
- Tom accepted that reasoning and approved the existing patch in #5, leaving the attached implementation unchanged.
- David committed the patch unchanged as 50eb4e1181 and confirmed it was pushed and backpatched through PostgreSQL 13 in #6, completing the thread's work.