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] defining valid memory zones


  • Subject: [Frama-c-discuss] defining valid memory zones
  • From: Pascal.CUOQ at cea.fr (CUOQ Pascal)
  • Date: Wed, 23 Sep 2009 08:31:08 +0200
  • References: <1253666099.30608.22.camel@valin>


>The value analysis considers that f1 don't terminate.
>
>test1.c:14:[kernel] warning: out of bounds read. assert \valid(adr+8);
>test1.c:16:[kernel] warning: non termination detected in function f1
>
>
>/*@ requires \valid(adr+ (0..100));
>    requires \valid(adr+8);
>*/
>int f1(const char * const  adr)

This is covered page 55 of the Value Analysis manual,
7.1.2, paragraph "Limitations", first limitation.
The manual is at
http://frama-c.cea.fr/download/value-analysis-Beryllium.pdf

For generating an initial state that is general enough
that you can reduce it with your assertions, you may be
interested in paragraph 5.2.4, page 42,
"Tweaking the automatic generation of initial values".
However, once you do that, you will find that reducing the
generated initial state with "\valid..." preconditions
is not supported (that is, you get false alarms as
documented in the second limitation of 
7.1.2, paragraph "Limitations").

Pascal