Difference between revisions of "C implicit Team1 (E-ACSL) Benchmark3"
(→Benchmark Data) |
(→Informal Description) |
||
(One intermediate revision by the same user not shown) | |||
Line 11: | Line 11: | ||
==== Informal Description ==== | ==== Informal Description ==== | ||
− | The property explored by this benchmark relates to memory safety and more specifically to a spatial error on a program's stack where | + | The property explored by this benchmark relates to memory safety and more specifically to a spatial error on a program's stack where pointer '''P''' to an allocated memory block '''A''' is used to read from a properly allocated memory location which address does not belong to '''A'''. |
− | The scenario explored by this benchmark is as follows. Two character arrays are allocated on a program's stack. The arrays are filled with data and the difference between their start addresses is computed. This difference is then used to print the contents of the second | + | The scenario explored by this benchmark is as follows. Two character arrays are allocated on a program's stack. The arrays are filled with data and the difference between their start addresses is computed. This difference is then used to print the contents of the second array using a pointer to the first array. |
==== Demonstration Traces ==== | ==== Demonstration Traces ==== | ||
Line 19: | Line 19: | ||
==== Formal Specification ==== | ==== Formal Specification ==== | ||
− | The formal | + | The formal specification is given using [http://frama-c.com/acsl.html ACSL] |
/*@ assert \base_addr(p) == \base_addr(p + i); */ | /*@ assert \base_addr(p) == \base_addr(p + i); */ |
Latest revision as of 10:18, 5 June 2016
Contents
Benchmark Data
This benchmark is located in crv.liflab.ca@/home/e-acsl/crv16_benchmarks/c-implicit-track/stack-read
The Trace Part
E-ACSL has no notion of trace
The Property Part
Informal Description
The property explored by this benchmark relates to memory safety and more specifically to a spatial error on a program's stack where pointer P to an allocated memory block A is used to read from a properly allocated memory location which address does not belong to A.
The scenario explored by this benchmark is as follows. Two character arrays are allocated on a program's stack. The arrays are filled with data and the difference between their start addresses is computed. This difference is then used to print the contents of the second array using a pointer to the first array.
Demonstration Traces
Formal Specification
The formal specification is given using ACSL
/*@ assert \base_addr(p) == \base_addr(p + i); */
where p is of pointer type and i is of integral type.