Oct 2022

4 commits
Harden memory context allocators against bogus chunk pointers.
10 Oct 2022Tom Lanemaster16beta1REL_19_STABLE16beta1REL_18_STABLE16beta1REL_17_STABLE16beta1REL_16_STABLE16beta1
LLM analysis, 100% suremodified before commitmoderate changesfrom patchset #1451 of 1 reviewer saw the final version

Matches #145 except that SlabFree's runtime block-validation error becomes AssertArg, with explanatory comments; Tom announces that exact adjustment in #149.

  • David Rowleysaw the final versionLLM analysis, 100% sureReviewed #145 in #146 and requested the SlabFree assertion-only policy incorporated into the committed version.
Improve our ability to detect bogus pointers passed to pfree et al.
7 Oct 2022Tom Lanemaster16beta1REL_19_STABLE16beta1REL_18_STABLE16beta1REL_17_STABLE16beta1REL_16_STABLE16beta1
LLM analysis, 100% surelanded as postedfrom patchset #1411 of 2 reviewers saw the final version

The mcxt.c and memutils_internal.h changes match #141, including bogus-method handlers, diagnostic header output, and reserved method IDs.

  • Andres Freundsaw an earlier versionLLM analysis, 99% sureRequested retained alignment checking and better diagnostics in #131 and #133, before subsequent runtime ID and diagnostic changes.
  • David Rowleysaw the final versionLLM analysis, 100% sureReported Windows and Ubuntu testing in #139 and endorsed the final wording in #142.
Remove MemoryContextContains().
6 Oct 2022Tom Lanemaster16beta1REL_19_STABLE16beta1REL_18_STABLE16beta1REL_17_STABLE16beta1REL_16_STABLE16beta1
LLM analysis, 100% surepart of a posted patchsetlight changesfrom patchset #1261 of 2 reviewers saw the final version

Exactly matches the API-removal component of #126, deleting MemoryContextContains and associated references from mcxt.c and memutils.h; the commit credits Tom Lane and David Rowley.

  • Andres Freundsaw an earlier versionLLM analysis, 89% sureChallenged the safety of the preceding membership-repair design in #107 and #109, helping motivate elimination of correctness-dependent membership checks.
  • Tom Lanesaw the final versioncommittercommitted the patch
Remove uses of MemoryContextContains in nodeAgg.c and nodeWindowAgg.c.
6 Oct 2022Tom Lanemaster16beta1REL_19_STABLE16beta1REL_18_STABLE16beta1REL_17_STABLE16beta1REL_16_STABLE16beta1
LLM analysis, 100% surepart of a posted patchsetlight changesfrom patchset #1261 of 2 reviewers saw the final version

Takes the executor and regression-test component of #126, adding only an explanatory nodeWindowAgg.c comment about tuple copying; the commit credits Tom Lane and David Rowley.

  • Andres Freundsaw an earlier versionLLM analysis, 91% sureProposed eliminating aggregate correctness dependencies on arbitrary-pointer membership tests in #107 and #109, before the final executor solution was developed.
  • Tom Lanesaw the final versioncommittercommitted the patch

Aug - Sep 2022

9 commits
Temporarily make MemoryContextContains return false
8 Sep 2022David Rowleymaster16beta1REL_19_STABLE16beta1REL_18_STABLE16beta1REL_17_STABLE16beta1REL_16_STABLE16beta1
LLM analysis, 100% surewritten from the discussion, no matching patch0 of 1 reviewer saw the final version

Implements the temporary false-return workaround after #101 and #103 exposed interior-pointer failures on 32-bit builds; the attached #106 instead implements block searches.

  • Julien Rouhaudsaw an earlier versionLLM analysis, 96% sureReported the 32-bit buildfarm failure in #101 that prompted this unattached workaround, well before the final allocator-hardening patchset.
Make MemoryContextContains work correctly again
7 Sep 2022David Rowleymaster16beta1REL_19_STABLE16beta1REL_18_STABLE16beta1REL_17_STABLE16beta1REL_16_STABLE16beta1
LLM analysis, 100% surelanded as postedfrom patchset #961 of 2 reviewers saw the final version

The mcxt.c diff matches #96, including GetMemoryChunkContext-based membership, null/alignment assertions, and assertions after allocation callbacks.

  • Andres Freundsaw an earlier versionLLM analysis, 95% sureReported the omitted MemoryContextContains adaptation and requested a test in #90, before the repair was written.
  • Tom Lanesaw the final versionLLM analysis, 91% sureClarified the required false-return prechecks in #95, which #96 incorporated with additional diagnostic assertions.
Make more effort to put a sentinel at the end of allocated memory
7 Sep 2022David Rowleymaster16beta1REL_19_STABLE16beta1REL_18_STABLE16beta1REL_17_STABLE16beta1REL_16_STABLE16beta1
LLM analysis, 100% surelanded as postedfrom patchset #880 of 1 reviewer saw the final version

Matches #88 in all three allocators, guaranteeing sentinel space for Slab, Generation and external AllocSet chunks while preserving small AllocSet size classes.

  • Tom Lanesaw an earlier versionLLM analysis, 98% sureChallenged the experimental memory overhead in #78 and endorsed the dedicated-block compromise in #80, before the production rewrite.
Fix some possibly latent bugs in slab.c
1 Sep 2022David RowleyREL_15_STABLE15beta4REL_14_STABLE14.6REL_13_STABLE13.9REL_12_STABLE12.13REL_11_STABLE11.18REL_10_STABLE10.23
LLM analysis, 99% suremodified before commitlight changesfrom patchset #491 of 2 reviewers saw the final version

Adapts #49's aligned SlabBlock calculations and sentinel correction to the older SlabChunk layout; its message explicitly identifies d5ee4db0ea as the already-landed master counterpart.

  • Tom Lanesaw the final versionLLM analysis, 99% sureTested the slab repair on ARM/PPC in #51 and confirmed the latent sentinel problem could affect extensions in #86.
  • Andres Freundsaw an earlier versionLLM analysis, 91% sureSupported the MAXALIGN-based repair over fragile explicit padding in #41, before the sentinel correction was added.
Various cleanups of the new memory context header code
30 Aug 2022David Rowleymaster16beta1REL_19_STABLE16beta1REL_18_STABLE16beta1REL_17_STABLE16beta1REL_16_STABLE16beta1
LLM analysis, 100% suremodified before commitlight changesfrom patchset #711 of 1 reviewer saw the final version

Contains #71's enum documentation and assertion casts plus the UINT64CONST expression cleanup identified in #73; the commit explicitly credits Robert Haas and David Rowley.

  • Tom Lanesaw the final versionLLM analysis, 100% sureRequested enum-limit documentation in #66 and identified the adjacent UINT64CONST misuse in #73, both addressed in the commit.
Revert "Add missing padding from MemoryChunk struct"
30 Aug 2022David Rowleymaster16beta1REL_19_STABLE16beta1REL_18_STABLE16beta1REL_17_STABLE16beta1REL_16_STABLE16beta1reverts 2 commits here
LLM analysis, 100% surewritten from the discussion, no matching patch0 of 2 reviewers saw the final version

Reverts df0f4feef8 without an attached revert patch, following the ineffective-padding diagnosis in #31 and the revert agreement in #60.

  • Tom Lanesaw an earlier versionLLM analysis, 98% sureRecommended reverting the ineffective padding in #38 and explained compiler alignment in #59, before the thread's later hardening designs.
  • Tomas Vondrasaw an earlier versionLLM analysis, 97% sureDemonstrated that the added padding did not change the failing layout in #31, supporting the unattached revert rather than reviewing the final hardening patchset.
Use MAXALIGN() in calculations using sizeof(SlabBlock)
30 Aug 2022David Rowleymaster16beta1REL_19_STABLE16beta1REL_18_STABLE16beta1REL_17_STABLE16beta1REL_16_STABLE16beta1
LLM analysis, 100% suremodified before commitlight changesfrom patchset #491 of 3 reviewers saw the final version

Matches #49's Slab_BLOCKHDRSZ repair, replacing its temporary sentinel pointer with the equivalent header-plus-size expression suggested in #53.

  • Tom Lanesaw the final versionLLM analysis, 100% sureReviewed the alignment approach and reported successful ARM/PPC core and test_decoding runs in #51 before commitment.
  • Andres Freundsaw an earlier versionLLM analysis, 96% sureArgued for the MAXALIGN-based correction in #41, before the additional sentinel-address repair.
  • Amit Kapilasaw an earlier versionLLM analysis, 94% sureReported the 32-bit alignment regression in #26 that this slab repair ultimately corrected.
Add missing padding from MemoryChunk struct
29 Aug 2022David Rowleymaster16beta1REL_19_STABLE16beta1REL_18_STABLE16beta1REL_17_STABLE16beta1REL_16_STABLE16beta1
LLM analysis, 100% surewritten from the discussion, no matching patch0 of 1 reviewer saw the final version

Adds MemoryChunk padding from David Rowley's diagnosis in #28 after the buildfarm report in #26; no attachment contains this padding fix.

  • Amit Kapilasaw an earlier versionLLM analysis, 97% sureReported the alignment failures in #26 that prompted the unattached padding fix, long before the final hardening patchset.
Improve performance of and reduce overheads of memory management
29 Aug 2022David Rowleymaster16beta1REL_19_STABLE16beta1REL_18_STABLE16beta1REL_17_STABLE16beta1REL_16_STABLE16beta1
LLM analysis, 100% suremodified before commitmoderate changesfrom patchset #240 of 4 reviewers saw the final version

Derives from #24 with free-list links moved back to chunk starts, revised AllocSetCheck validation, and naming/comment cleanup announced in #25; the commit credits Andres Freund and David Rowley.

  • Yura Sokolovsaw an earlier versionLLM analysis, 99% sureQuestioned oversized-header fields and proposed normal-block limits in #2, before the fixed-header redesign.
  • Robert Haassaw an earlier versionLLM analysis, 99% sureReviewed the dispatch design and requested clarification of normal-block versus huge-allocation limits in #10.
  • Tom Lanesaw an earlier versionLLM analysis, 99% sureChallenged the method-ID capacity and huge-allocation restrictions in #12, accepting the extensibility explanation in #15 and #17.
  • Alvaro Herrerasaw an earlier versionLLM analysis, 97% sureSupported using designated method initializers in #13, which the author adopted before later allocator changes.

Credits across 13 commits

Author
David Rowley3 LLM8
Tom LaneLLM2
Tomas Vondra2
Andres Freund1
Robert Haas1
Reviewer
Tom Lanecommitter2
Reported by
Andres Freund1
Committer
David Rowley9
Tom Lane4

N LLM means N of the credits come from LLM analysis, not from commit trailers.