From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Xen-devel <xen-devel@lists.xen.org>
Cc: Keir Fraser <keir@xen.org>,
Ian Campbell <Ian.Campbell@citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Tim Deegan <tim@xen.org>,
coverity@xenproject.org, Jan Beulich <JBeulich@suse.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: [PATCH] misc/coverity: Model __builtin_unreachable()
Date: Wed, 24 Sep 2014 14:53:14 +0100 [thread overview]
Message-ID: <1411566794-11652-1-git-send-email-andrew.cooper3@citrix.com> (raw)
This resolves 23 issues Coverity had identified by following the false path of
an ASSERT().
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
CC: coverity@xenproject.org
CC: Keir Fraser <keir@xen.org>
CC: Jan Beulich <JBeulich@suse.com>
CC: Tim Deegan <tim@xen.org>
CC: Ian Campbell <Ian.Campbell@citrix.com>
CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
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
next reply other threads:[~2014-09-24 13:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-24 13:53 Andrew Cooper [this message]
2014-09-24 14:50 ` [PATCH] misc/coverity: Model __builtin_unreachable() Jan Beulich
2014-09-24 14:56 ` Andrew Cooper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1411566794-11652-1-git-send-email-andrew.cooper3@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=coverity@xenproject.org \
--cc=keir@xen.org \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).