WL#13110: Compile time check of error message arguments
Affects: Server-8.0 — Status: Complete
Compile time check of error message arguments Error message arguments are not checked at compile time. This may cause unexpected errors at runtime. This WL creates a CMAKE option -DCHECK_ERRMSG_FORMAT=1 where the number and type of arguments to error messages are checked at compile time. This is created as an option as it only works with the default English language. The default setting for this option is OFF. This will rely on the attribution MY_ATTRIBUTE((format(printf, 2, 0))); which are effective with gcc, clang, mac and Windows. This WL will handle the following functions: my_printf_error my_printv_error push_warning_printf Parse_tree_node_tmpl
::errorf() snprintf() my_safe_snprintf() my_safe_printf_stderr() This will only cover calls where the error-code is not a variable for the time being. There are some cases where the error-code is non-const where we have % substitutions. This will only cover messages to the client.
Copyright (c) 2000, 2019, Oracle Corporation and/or its affiliates. All rights reserved.