qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 0/2] target-arm: Avoid clang sanitizer warnings


From: Peter Maydell
Subject: [Qemu-devel] [PATCH 0/2] target-arm: Avoid clang sanitizer warnings
Date: Fri, 23 Aug 2013 17:12:37 +0100

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]