|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] misc/coverity: Model __builtin_unreachable()
This resolves 23 issues Coverity had identified by following the false path of
an ASSERT().
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CC: coverity@xxxxxxxxxxxxxx
CC: Keir Fraser <keir@xxxxxxx>
CC: Jan Beulich <JBeulich@xxxxxxxx>
CC: Tim Deegan <tim@xxxxxxx>
CC: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
CC: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
misc/coverity/model.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/misc/coverity/model.c b/misc/coverity/model.c
index fac2ecb..bd62566 100644
--- a/misc/coverity/model.c
+++ b/misc/coverity/model.c
@@ -121,6 +121,16 @@ void libxl__ctx_unlock(libxl_ctx *ctx)
}
/*
+ * Coverity doesn't understand __builtin_unreachable(), which causes it to
+ * incorrectly find issues based on continuing execution along the false
+ * branch of an ASSERT().
+ */
+void __builtin_unreachable(void)
+{
+ __coverity_panic__();
+}
+
+/*
* Local variables:
* mode: C
* c-file-style: "BSD"
--
1.7.10.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |