qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] target-arm: Avoid clang sanitizer warnings
@ 2013-08-23 16:12 Peter Maydell
  2013-08-23 16:12 ` [Qemu-devel] [PATCH 1/2] target-arm: Use sextract32() in branch decode Peter Maydell
  2013-08-23 16:12 ` [Qemu-devel] [PATCH 2/2] target-arm: Avoid "1 << 31" undefined behaviour Peter Maydell
  0 siblings, 2 replies; 7+ messages in thread
From: Peter Maydell @ 2013-08-23 16:12 UTC (permalink / raw)
  To: qemu-devel; +Cc: patches

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-08-24 10:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-23 16:12 [Qemu-devel] [PATCH 0/2] target-arm: Avoid clang sanitizer warnings Peter Maydell
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

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).