Frama-C-discuss mailing list archives
This page gathers the archives of the old Frama-C-discuss archives, that was hosted by Inria's gforge before its demise at the end of 2020. To search for mails newer than September 2020, please visit the page of the new mailing list on Renater.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Frama-c-discuss] Value Analysis: signed_overflow in addition to division_by_zero warning
- Subject: [Frama-c-discuss] Value Analysis: signed_overflow in addition to division_by_zero warning
- From: boris at yakobowski.org (Boris Yakobowski)
- Date: Tue, 28 Jan 2014 00:14:18 +0100
- In-reply-to: <C3B1C998-3A55-430F-9391-5E38035CECC2@tu-harburg.de>
- References: <C3B1C998-3A55-430F-9391-5E38035CECC2@tu-harburg.de>
Hello, On Mon, Jan 27, 2014 at 2:41 PM, Marcel Gehrke <marcel.gehrke at tu-harburg.de> wrote: > The division-by-zero warnings are clear. Indeed. Notice that option -remove-redundant-alarms will get rid of the alarms in the 'if' block, as they are logically implied by the first one. > I do not understand the signed-overflow warning. > Can you guys help me figure out why the signed-overflow warning was annotated? This is due to an over-approximation in the function that handles potential overflows. It fails to catch the fact that the result is guaranteed to be undefined/bottom, and instead approximates the result by supposing that it contains all possible integer values. This causes the two alarms. The results are particularly odd because at the end of this handling function, we intersect the inferred range by the range before having treated the overflow. This results in bottom. > Further, if the annotation is needed, why is it not also annotated before the if block? The annotation is superfluous, and will not appear in the next version. Thanks for noticing this imprecision and reporting it. -- Boris
- References:
- [Frama-c-discuss] Value Analysis: signed_overflow in addition to division_by_zero warning
- From: marcel.gehrke at tu-harburg.de (Marcel Gehrke)
- [Frama-c-discuss] Value Analysis: signed_overflow in addition to division_by_zero warning
- Prev by Date: [Frama-c-discuss] Array size in Frama-C
- Next by Date: [Frama-c-discuss] two-dimensional array requires clause
- Previous by thread: [Frama-c-discuss] Array size in Frama-C
- Next by thread: [Frama-c-discuss] two-dimensional array requires clause
- Index(es):