[Top][All Lists]

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

Re: [Qemu-devel] [BUG] 216 Alerts reported by LGTM for QEMU (some might

From: Stefan Weil
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
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

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


reply via email to

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