summaryrefslogtreecommitdiffstats
path: root/contrib/coverity
diff options
context:
space:
mode:
authorRichard Yao <[email protected]>2022-09-16 16:45:15 -0400
committerGitHub <[email protected]>2022-09-16 13:45:15 -0700
commit8da218a7a2ee0d0c0a0741f1007ebce0bf22584a (patch)
treed27d48174d9d80e45674444c4d1ebe885e458f13 /contrib/coverity
parent1b6f3368dd5b416753178da06cb19c32798671e6 (diff)
Update coverity model
`uu_panic()` needs to be modelled and the definition of `vpanic()` from the original coverity model was missing `__coverity_format_string_sink__()`. We also model `libspl_assertf()` as part of an attempt to eliminate false positives. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Richard Yao <[email protected]> Closes #13901
Diffstat (limited to 'contrib/coverity')
-rw-r--r--contrib/coverity/model.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/contrib/coverity/model.c b/contrib/coverity/model.c
index ee2d01e7f..d27abd038 100644
--- a/contrib/coverity/model.c
+++ b/contrib/coverity/model.c
@@ -70,9 +70,24 @@ panic(const char *fmt, ...)
void
vpanic(const char *fmt, va_list adx)
{
- (void) fmt;
(void) adx;
+ __coverity_format_string_sink__(fmt);
+ __coverity_panic__();
+}
+
+void
+uu_panic(const char *format, ...)
+{
+ __coverity_format_string_sink__(format);
+ __coverity_panic__();
+}
+
+int
+libspl_assertf(const char *file, const char *func, int line,
+ const char *format, ...)
+{
+ __coverity_format_string_sink__(format);
__coverity_panic__();
}