model-writtenrun 540 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Chao Li reported that MemoryContextAllocAligned() could crash when an underlying allocation returned NULL with MCXT_ALLOC_NO_OOM, although current core callers did not exercise this case #1.
- Chao Li proposed returning NULL before computing the aligned pointer, also allowing AlignedAllocRealloc() to handle allocation failure as intended #1.
- David Rowley committed the fix with an explanatory comment and an assertion that a NULL result requires MCXT_ALLOC_NO_OOM, crediting Chao Li and specifying backpatching through PostgreSQL 16 03f420c37f.
- David Rowley confirmed that he had pushed the patch #2.
- Chao Li thanked David Rowley, closing the thread with the fix committed and no outstanding work discussed #3.