model-writtenrun 2838 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Anthonin Bonnefoy traced ARM64 JIT crashes and infinite loops to LLVM RuntimeDyld placing code and data beyond the relocation range, and reported that JITLink avoided the failure but lacked sufficient support in older LLVM versions #1.
- After discussing disabling JIT and detecting address overflows, Anthonin supplied a reproducer using large shared_buffers and partitioned tables and proposed injecting a patched SectionMemoryManager through LLVM's allocator interface #3 #4 #5.
- Thomas Munro first posted an allocation-logging experiment, then replaced it with a complete copy of LLVM's proposed contiguous-allocation fix, preferring the whole class to a smaller subclass so upstream comparisons would remain straightforward #6 #7.
- Anthonin reproduced the problem across PostgreSQL releases, corrected the architecture check and Meson filename, restricted the replacement manager to ARM64, and confirmed that the corrected patch prevented the crash #9.
- Thomas moved the imported class into llvm::backport, limited the workaround to LLVM 12 and newer, and centralized its compilation guards, while proposing to wait for upstream adoption before PostgreSQL's November minor releases #12 #13.
- Anthonin demonstrated successful patched execution against LLVM 13 through 19, fixed CI header checks by excluding the imported C++ header, and submitted a separate LLVM_CPPFLAGS improvement for local header checks #14 #15.
- After extended testing found no problems or performance regressions, Thomas decided to proceed because his investigation of JITLink found it insufficient across PostgreSQL's supported LLVM versions #16 #17.
- Thomas returned with a rebased patch and fuller rationale but paused over licensing; this submission retained the header exclusion and omitted the auxiliary LLVM_CPPFLAGS patch, whose disposition was not explained in the thread #18.
- Anthonin and Daniel Gustafsson reviewed the licensing requirements, after which Thomas added the LLVM license text, provenance and eventual-removal comments, and a pgindent exclusion for the imported header #19 #20 #21.
- The thread ended with Anthonin confirming C++ compatibility and approving the final patch; Thomas then landed its changes unchanged apart from rebase and whitespace adjustments in b7467ab71c, with backports supplied for the same fix, while a future JITLink migration remained separate work #22 #21.