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 <behlendorf1@llnl.gov>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #13901
This commit is contained in:
Richard Yao 2022-09-16 16:45:15 -04:00 committed by GitHub
parent 1b6f3368dd
commit 8da218a7a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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__();
}