model-writtenrun 7798 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Alexander Lakhin reported that psql's help command triggered a Valgrind uninitialized-memory diagnostic in helpSQL(), with reproduction details in #1.
- Kyotaro Horiguchi reproduced the problem and submitted #2, correcting checks before accessing the input string and fixing word-length counting that could select incorrect help topics.
- Tom Lane agreed that the loop was unsafe and identified additional problems with output initialization and pager line counting, prompting a broader review of the function in #3.
- Tom Lane committed f76a85000b, incorporating #2 and adding fixes for fallback matching, pagination, and a syntax-buffer memory leak, with backports to all supported branches.
- Kyotaro Horiguchi acknowledged the improved result after the commit in #4, closing the thread with the fix landed and no outstanding work identified.