From: Stefan Weil <sw@weilnetz.de>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Kevin Wolf <kwolf@redhat.com>,
Eduardo Habkost <ehabkost@redhat.com>,
QEMU Developers <qemu-devel@nongnu.org>,
Max Reitz <mreitz@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [BUG] 216 Alerts reported by LGTM for QEMU (some might be release critical)
Date: Sun, 14 Jul 2019 19:44:55 +0200 [thread overview]
Message-ID: <63d96e86-3823-2586-eb25-44beff91f8f2@weilnetz.de> (raw)
In-Reply-To: <CAFEAcA-ZEsX2nf7OmLmBE+v3VLHYQo60m8Vay28o7VNVgcn_ig@mail.gmail.com>
Am 14.07.2019 um 19:30 schrieb Peter Maydell:
[...]
> "Analyzer thinks this multiply can overflow
> but in fact it's not possible" is quite a common false
> positive cause...
The analysers don't complain because a multiply can overflow.
They complain because the code indicates that a larger result is
expected, for example uint64_t = uint32_t * uint32_t. They would not
complain for the same multiplication if it were assigned to a uint32_t.
So there is a simple solution to write the code in a way which avoids
false positives...
Stefan
next prev parent reply other threads:[~2019-07-14 17:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-13 17:46 [Qemu-devel] [BUG] 216 Alerts reported by LGTM for QEMU (some might be release critical) Stefan Weil
2019-07-13 19:42 ` Paolo Bonzini
2019-07-14 13:28 ` Stefan Weil
2019-07-15 8:26 ` Kevin Wolf
2019-07-14 17:30 ` Peter Maydell
2019-07-14 17:44 ` Stefan Weil [this message]
2019-07-15 5:10 ` Markus Armbruster
2019-07-15 8:08 ` Richard Henderson
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=63d96e86-3823-2586-eb25-44beff91f8f2@weilnetz.de \
--to=sw@weilnetz.de \
--cc=ehabkost@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.