https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77966

--- Comment #4 from Denis Vlasenko <vda.linux at googlemail dot com> ---
This confuses object code sanity analysis tools which check that every function
ends "properly", i.e. with a return or jump (possibly padded with nops).

Can gcc get an option like -finsert-stop-insn-when-unreachable[=insn], making
bad programs crash if they do reach "impossible" code, rather than happily
running off and executing random stuff?

For x86, one-byte INT3, INT1, HLT or two-byte UD2 insn would be a good choice.

Reply via email to