model-writtenrun 7649 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Peter Smith reported that stream_cleanup_files() dereferenced a hash entry after HASH_REMOVE and supplied a patch that finds the entry first and removes it after file cleanup #1.
- Amit Kapila proposed retaining HASH_REMOVE and checking its found flag, but Peter explained that changing the assertion would leave the subsequent dangling-pointer accesses unfixed #2 #3.
- Thomas Munro suggested poisoning removed entries or returned pointers to expose such bugs during testing; Peter noted that some callers compare the actual returned pointer, complicating pointer poisoning #4 #5.
- Andres Freund supported memory-access instrumentation and argued that combining removal with lookup in hash_search() creates an unsafe API; these broader changes remained suggestions in this thread #6.
- Amit acknowledged that Peter's patch fixes the problem #7, committed it unchanged as 4b82ed6eca, and closed the thread by confirming it was pushed #8.