model-writtenrun 3301 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- a.kozhemyakin reported that a malformed PL/Tcl procedure return value crashed the server through a null pointer in throw_tcl_error #1; Tom Lane reproduced it #2.
- Pierre Forstmann independently reproduced the crash and explored replacing the error-context lookup with the interpreter result #3, but Erik Wienhold explained that this duplicated the primary error and that Tcl_ListObjGetElements does not populate errorInfo, suggesting direct error reporting instead #4.
- Tom initially considered making the shared error helper tolerate missing errorInfo #5, but Erik clarified that errorInfo is populated during script evaluation rather than standalone list conversion #6.
- Tom then demonstrated that errorInfo could also retain misleading text from an earlier error and submitted a patch that reports list-conversion failures directly, documents the helper's restrictions, and adds a regression test #7.
- Tom deferred introducing another helper because only two calls could use it, and left compile_pltcl_function unchanged because its exceptional failure was difficult to reproduce and test; he separately proposed clearer trigger-error wording #7.
- Erik approved the attached patch and supported the trigger-error wording change #8; he is credited jointly with Tom on the resulting commits, so his participation is treated as co-authorship rather than a suggested independent review.
- The supplied candidates 30487423c8 and b631d01498 represent the same fix across branches, derived from #7 with light wording and test-comment edits; the commit message records backpatching to all supported branches, and Tom closed the thread by confirming the push #9.