Feb 2025

1 commit
Fix unsafe access to BufferDescriptors
19 Feb 2025Richard Guomaster18beta1REL_19_STABLE18beta1REL_18_STABLE18beta1REL_17_STABLE17.5REL_16_STABLE16.9REL_15_STABLE15.13REL_14_STABLE14.18REL_13_STABLE13.21
LLM analysis, 100% suremodified before commitlight changesfrom patchset #12 of 2 reviewers saw the final version

The commit preserves both functional edits from #1 in BufferGetLSNAtomic(): removing the initial descriptor lookup and performing it immediately before LockBufHdr(). The only code difference is the placement of the uninitialized bufHdr declaration among the local variables.

  • Xuneng Zhousaw the final versiontrailerXuneng examined #1, agreed the fix was reasonable, and requested an explanation of the negative-buffer-ID case in #2; only declaration ordering changed before landing.
  • Richard Guosaw the final versiontrailerRichard approved #1 and explained why the existing lookup had caused no malfunction in #4, then committed the final version.

Credits across 1 commit

Author
Tender Wang1
Reviewer
Richard Guo1
Xuneng Zhou1
Committer
Richard Guo1