__stack_chk_fail does not return, but unreachable was not generated
following call __stack_chk_fail. This had a possibility to generate an
invalid binary for functions with a return type, because
__stack_chk_fail's return type is void and call __stack_chk_fail can
be the last instruction in the function whose return type is non-void.
Generating unreachable after it makes sure CFGStackify's
fixEndsAtEndOfFunction handles it correctly.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
- Align FileCheck lines
llvm/test/CodeGen/WebAssembly/stack-protector.ll | ||
---|---|---|
4 | After adding unreachable, somehow the branch order changed and this became i32.eq instead, so I deleted this. |
After adding unreachable, somehow the branch order changed and this became i32.eq instead, so I deleted this.