• Sources: Martin Uecker, 2026-07-14, HN discussion
  • Summary: Taking the address of a nested function historically forced an executable stack or a heap allocation that could leak across longjmp. GCC 16 guarantees the trampoline-free form, and GCC 17 merges __builtin_call_code_address and __builtin_call_static_chain, which extend the guarantee to captures while keeping access to the parent frame.
  • Why it matters: C code that used nested functions can drop the executable-stack requirement that hardened toolchains and kernels reject.

send feedback on this story