The clang compiler has a format string checker. It checks for functions like printf that take a format string and a variable number of arguments that the variable arguments have the expected type for the format string. This covers most of the in-practice uses of varargs. We've extended the format string checker in the Checked C clang compiler to understand some simple uses of checked pointers, ensuring that those uses in varargs are safe and can be used in checked scopes.
We need to update the Wiki to describe this and add some information to the specification about this.
The clang compiler has a format string checker. It checks for functions like
printf
that take a format string and a variable number of arguments that the variable arguments have the expected type for the format string. This covers most of the in-practice uses of varargs. We've extended the format string checker in the Checked C clang compiler to understand some simple uses of checked pointers, ensuring that those uses in varargs are safe and can be used in checked scopes.We need to update the Wiki to describe this and add some information to the specification about this.