From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Yoshinori Sato" <ysato@users.sourceforge.jp>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
"QEMU Developers" <qemu-devel@nongnu.org>,
"Igor Mammedov" <imammedo@redhat.com>,
"Richard Henderson" <rth@twiddle.net>
Subject: Re: [PULL v2 05/13] target/rx: CPU definitions
Date: Sat, 21 Mar 2020 12:05:37 +0100 [thread overview]
Message-ID: <c37c2932-a409-238f-9906-422c98583833@redhat.com> (raw)
In-Reply-To: <CAFEAcA_xRmiTfNfYHW7DLM9pCSvssNRXZWkqoQSggFLgEUPMRw@mail.gmail.com>
On 3/20/20 5:37 PM, Peter Maydell wrote:
> On Fri, 20 Mar 2020 at 16:32, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>> -fwrapv is here indeed.
>>
>> I use
>> --extra-cflags=-fsanitize=address,alignment,array-bounds,bool,builtin,enum,float-cast-overflow,float-divide-by-zero,function,integer-divide-by-zero,nonnull-attribute,null,pointer-overflow,return,returns-nonnull-attribute,shift-base,shift-exponent,signed-integer-overflow,unreachable,vla-bound,vptr
>
> There was a bug in older clang versions where the shift-base
> sanitizer didn't honour -fwrapv:
> https://bugs.llvm.org/show_bug.cgi?id=25552
>
> https://wiki.qemu.org/Testing#clang_UBSan
> says you can work around the clang bug with -fno-sanitize=shift-base.
>
> The bug was fixed upstream back in 2016, though, so the
> fix ought to be in clang 4, I think. Are you using an
> old clang version, or has it regressed in newer clang?
I am sorry I am very confused here.
$ clang -v
clang version 8.0.0 (Fedora 8.0.0-3.fc30)
I use scan-build which set CC=ccc-analyzer.
$ ccc-analyzer -v
gcc version 9.2.1 20190827 (Red Hat 9.2.1-1) (GCC)
I use the output of 'make V=1' and run directly ccc-analyzer, I get:
gcc: error: unrecognized argument to ‘-fsanitize=’ option: ‘array-bounds’
gcc: error: unrecognized argument to ‘-fsanitize=’ option: ‘function’
So Clang is used.
I notice ccc-analyzer appends -Wno-shift-negative-value, however if I
run the 'make V=1' output using clang instead (with all the -fsanitize
options, -fwrapv, -Wno-shift-negative-value) then no warning are emitted.
So I think this is simply a problem with scan-build/ccc-analyzer, or I
should tune it more for QEMU.
next prev parent reply other threads:[~2020-03-21 11:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-20 10:35 [PULL v2 00/13] target: Add the Renesas RX architecture Philippe Mathieu-Daudé
2020-03-20 10:35 ` [PULL v2 05/13] target/rx: CPU definitions Philippe Mathieu-Daudé
2020-03-20 16:04 ` Philippe Mathieu-Daudé
2020-03-20 16:18 ` Richard Henderson
2020-03-20 16:21 ` Peter Maydell
2020-03-20 16:32 ` Philippe Mathieu-Daudé
2020-03-20 16:37 ` Peter Maydell
2020-03-21 11:05 ` Philippe Mathieu-Daudé [this message]
2020-03-21 11:17 ` Philippe Mathieu-Daudé
2020-03-20 13:53 ` [PULL v2 00/13] target: Add the Renesas RX architecture 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=c37c2932-a409-238f-9906-422c98583833@redhat.com \
--to=philmd@redhat.com \
--cc=f4bug@amsat.org \
--cc=imammedo@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=rth@twiddle.net \
--cc=ysato@users.sourceforge.jp \
/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).