[clang] fix kcfi doesn't take effect when callee function has no input parameter (PR #106677)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 30 11:53:56 PDT 2024


https://github.com/efriedma-quic commented:

If a function is declared without a prototype (pre-C23), it doesn't mean it has a void argument list; it means the argument list is undeclared.  So you can't just assume the argument list is void; you have to compute the argument types from the actual arguments passed to the call.

Or you could just forbid unprototyped functions in KCFI mode, If you don't want to deal with the edge cases here (i.e. -Werror=strict-prototypes).

https://github.com/llvm/llvm-project/pull/106677


More information about the cfe-commits mailing list