This could improve user experience for stack unwinding, and also this is
enabled by default by X86 and AArch64 and RISC-V GCC.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
LG since GCC made a similar change and this matches several major architectures on Linux/other ELF based operating systems.
(At heart I think -fasynchronous-unwind-tables is not a good default. I agree with https://blogs.gnome.org/chergert/2022/12/31/frame-pointers-and-other-practical-near-term-solutions/ which has said:
"Again, I don’t think any of us like frame pointers, just that they are generally lower effort today while also being reasonably reliable.")
Funnily enough, @jobnoorman and I were just discussion something related to this, how -fexceptions doesn't seem to enable unwind tables as you'd expect. This change hides that issue in the common case you're targeting Linux, but I've filed https://github.com/llvm/llvm-project/issues/61216 to track it. Just thought I'd advertise here because reviewers of this patch have likely looked through these code paths recently and might have a view on this bug.