model-writtenrun 5743 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Tom Lane reported GCC 12's warning about storing a local variable's address in stack_base_ptr and submitted a patch using a non-inlined set_stack_base_from() helper to suppress it #1.
- The proposal preserved set_stack_base() for PL/Java compatibility and made the stack-pointer variables static again; Tom questioned the workaround's durability and whether the visibility change should be backpatched #1.
- Andres Freund suggested using __builtin_frame_address(0) when available and separately noted that sanitizer configurations using multiple stacks could defeat stack-depth checking, an issue this thread did not resolve #2.
- Tom accepted the builtin approach because it avoided API changes, retaining the original workaround as a possible fallback if other compilers later produced similar warnings #3.
- Tom subsequently committed the substantially revised patch with builtin detection and the original local-variable fallback, retaining the static-variable cleanup and backpatching the warning fix through PostgreSQL 12; older branches were deferred because they required more work, and no revised attachment was posted #1 de447bb8e6.