From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: patches@linaro.org
Subject: [Qemu-devel] [PATCH 0/2] target-arm: Avoid clang sanitizer warnings
Date: Fri, 23 Aug 2013 17:12:37 +0100 [thread overview]
Message-ID: <1377274359-8707-1-git-send-email-peter.maydell@linaro.org> (raw)
These patches avoid some clang sanitizer warnings triggered
on target-arm code which inadvertently shifts into the sign
bit of a signed integer (which is undefined behaviour in C).
(For more info on the sanitizer see
http://blog.regehr.org/archives/963 ; the basic approach
is to install clang 3.3 and then configure QEMU with
--cc=clang --extra-cflags='-fsanitize=undefined' ; the resulting
QEMU will print warnings at runtime for various kinds of
integer undefined behaviour.)
Peter Maydell (2):
target-arm: Use sextract32() in branch decode
target-arm: Avoid "1 << 31" undefined behaviour
target-arm/cpu.h | 2 +-
target-arm/helper.c | 4 ++--
target-arm/translate.c | 5 +++--
3 files changed, 6 insertions(+), 5 deletions(-)
--
1.7.9.5
next reply other threads:[~2013-08-23 16:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-23 16:12 Peter Maydell [this message]
2013-08-23 16:12 ` [Qemu-devel] [PATCH 1/2] target-arm: Use sextract32() in branch decode Peter Maydell
2013-08-23 18:09 ` Richard Henderson
2013-08-24 10:21 ` Peter Maydell
2013-08-23 16:12 ` [Qemu-devel] [PATCH 2/2] target-arm: Avoid "1 << 31" undefined behaviour Peter Maydell
2013-08-23 18:11 ` Richard Henderson
2013-08-24 10:38 ` Peter Maydell
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=1377274359-8707-1-git-send-email-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=patches@linaro.org \
--cc=qemu-devel@nongnu.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).