https://reviews.llvm.org/D95745 introduced a new unwind keyword for inline assembler expressions. Inline asms marked with the unwind keyword allows stack unwinding from inline assembly because the compiler emits unwinding information ("around" the inline asm) as it would for calls/invokes. Unwinding the stack from within non-unwind inline asm may cause UB.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
I think more commit message text is necessary here.
Would this mean asm w/o unwind cannot unwind?
Comment Actions
I think more commit message text is necessary here.
I agree.
Would this mean asm w/o unwind cannot unwind?
The unwind keyword causes llvm to treat the inline assembly as "unwindable", so appropriate unwind information/tables are emitted by codegen. By omitting the unwind keyword, llvm doesn't emit these information and therefore unwinding from inline assembly might not be sound or even UB.