model-writtenrun 6398 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Thomas Munro opened the investigation after seawasp's bleeding-edge Clang builds repeatedly failed with allocator corruption, requesting usable core dumps to locate the fault #1.
- Fabien COELHO removed Ubuntu's crash handler and enabled core dumps; subsequent failures included ltree stack-depth errors and a crash during llvm_shutdown, prompting a Valgrind investigation #4 #11 #12 #13.
- After Fabien's Valgrind report upload failed, Thomas independently reproduced incorrect ltree results with LLVM 13 and obtained an invalid-read trace involving LLVM's symbol strings and resource cleanup #15 #16.
- Tom Lane narrowed the regression window from seawasp's compiler history, and Andres Freund reproduced the failure and traced it to a silent LLVM API change requiring callers to increment a string-pool reference count #18 #19 #20 #21.
- Thomas posted an inline reference-count fix that eliminated his incorrect results and Valgrind errors, but noted that its placement might mishandle errors; Andres recommended retaining names in the existing loop before LLVMOrcAbsoluteSymbols took ownership, and Thomas incorporated that change into the sole attached patchset #23 #24 #26 #28.
- Tom questioned compile-time LLVM version checks; Andres explained the major-version linkage protections, and Thomas investigated Unix and macOS packaging, finding additional protection through versioned libraries or static linking while leaving a possible Homebrew configuration concern unresolved #25 #27 #30.
- Thomas outlined the choice between waiting for LLVM 13's release and shipping proactively; Tom favored preventing crashes despite a possible leak if LLVM reverted its API change, and Andres supported immediate backpatching #28 #29 #31.
- Thomas committed the attached patch's code unchanged as 9b4e4cfe66, expanded the commit explanation, and backpatched through PostgreSQL 11, then announced that seawasp should recover #28 #32.
- Fabien scheduled a fresh seawasp run and confirmed it passed, closing the thread with the fix landed and the reported buildfarm failure resolved #33 #34.