A hand-written function, JIT stub, or trampoline can pass the easiest test: it returns to the caller with the right value.
That is not enough.
The claim in this essay is narrower and more useful: modern ABI correctness includes the failure path. A function frame has to be executable on the sunny path and explainable when an exception runtime, debugger, profiler, sanitizer, or crash reporter needs to reconstruct the caller. Returning correctly proves the epilogue worked. It does not prove the frame can be unwound.
The concrete artifact is unwind metadata. On Windows x64, a non-leaf function that allocates stack or calls another function is not fully described by its code bytes alone. The system also needs a function-table entry and unwind information: where the function starts and ends, how much stack it allocated, which nonvolatile registers were saved, and how to recover the caller’s state. On ELF-oriented toolchains, hand-written assembly often tells the same story through CFI directives:
.cfi_startproc
push rbp
.cfi_def_cfa_offset 16
.cfi_offset rbp, -16
mov rbp, rsp
.cfi_def_cfa_register rbp
call helper
pop rbp
.cfi_def_cfa rsp, 8
ret
.cfi_endprocThe exact encoding varies by platform. The mechanism does not: a live frame needs a machine-readable explanation.
The boundary is important. This is not a claim that every small leaf helper needs elaborate metadata, or that one Windows rule generalizes cleanly to every object format. Leaf-function shortcuts exist. Platform rules differ. The bug appears when the function evolves - adds a call, saves a nonvolatile register, allocates scratch space, or becomes a trampoline - and the frame description does not evolve with it.
That creates a boring failure mode, which is why it is common: the code works until observability enters the system.
That is the practical boundary: the call has to remain explainable to the machinery that arrives after the sunny path has already succeeded.
Read the full essay on lospino.so: It Works Until the Stack Walker Arrives
Original essay published on lospino.so on 2026-06-08. This Substack dispatch is an adapted pointer to the canonical version, not a mirrored copy.

