model-writtenrun 4721 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Karina Litskevich reported that shrinking large allocations could mark memory beyond the new allocation incorrectly, causing false Valgrind reports, and proposed a fix plus clearer comments and variable naming #1.
- Tom Lane questioned whether the first fix sufficiently bounded the marked region, suggested using Min(size, oldsize), and requested that explanatory comments accompany the bug fix #2.
- Karina incorporated those suggestions, retained the separate variable rename, and avoided redundant Valgrind marking when randomize_mem() already marks the memory undefined #3.
- Tom committed both revised patches from #3 with light comment and formatting changes as b3e184a5d4, with backports to all supported branches.
- Tom closed the thread by confirming that the patch looked good and had been pushed after further comment adjustments, leaving no outstanding work identified in the thread #4.