Speak at Bengaluru Systems meet-up

Call for talks & demos for monthly meet-ups

Rohith Suresh

@RS2007

Stack unwinding for fun and profit

Submitted Apr 21, 2026

Whenever a program crashes, throws an exception, or gets profiled, a stack unwinder is the unsung hero working behind the scenes to make sense of the chaos. But how does it actually work? In this talk, we will demystify the dark art of stack unwinding by building and exploring unwinders, scaling up in complexity.

In this talk, we will explore:

  • The Classic Approach: Walking the stack using base pointers (rbp/rsp) in pure C with inline assembly.

  • Why frame pointers aren’t enough: We will explore the pitfalls of modern optimizations (-fomit-frame-pointer), inline functions, and signal frames that completely break traditional unwinding.

  • The DWARF in the Machine: A deep dive into modern unwinding using DWARF .eh_frame sections.

  • The Future: A brief look at hardware-assisted unwinding and Shadow Stacks (e.g., Intel CET) as the next evolution of security and performance.

Comments

{{ gettext('Login to leave a comment') }}

{{ gettext('Post a comment…') }}
{{ gettext('New comment') }}
{{ formTitle }}

{{ errorMsg }}

{{ gettext('No comments posted yet') }}

Hosted by

Bengaluru Systems Meetup