Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
frama-c
Commits
97a3c1d9
Commit
97a3c1d9
authored
2 years ago
by
Virgile Prevosto
Browse files
Options
Downloads
Patches
Plain Diff
[tests] more tests on array size cache
parent
e1ac1e16
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/misc/array_sizeof.i
+8
-1
8 additions, 1 deletion
tests/misc/array_sizeof.i
tests/misc/oracle/array_sizeof.res.oracle
+15
-4
15 additions, 4 deletions
tests/misc/oracle/array_sizeof.res.oracle
with
23 additions
and
5 deletions
tests/misc/array_sizeof.i
+
8
−
1
View file @
97a3c1d9
...
@@ -4,7 +4,14 @@ STDOPT:
...
@@ -4,7 +4,14 @@ STDOPT:
*/
*/
int
x
;
int
x
;
void
main
()
{
void
main
(
int
c
)
{
if (c) {
unsigned char buf[sizeof(unsigned char[1]) + sizeof(x)];
unsigned char buf[sizeof(unsigned char[1]) + sizeof(x)];
buf[sizeof(buf)];
buf[sizeof(buf)];
}
}
else {
x = 4;
unsigned char buf[sizeof(unsigned char[1]) + x];
buf[x];
}
}
This diff is collapsed.
Click to expand it.
tests/misc/oracle/array_sizeof.res.oracle
+
15
−
4
View file @
97a3c1d9
...
@@ -4,26 +4,37 @@
...
@@ -4,26 +4,37 @@
[eva] Initial state computed
[eva] Initial state computed
[eva:initial-state] Values of globals at initialization
[eva:initial-state] Values of globals at initialization
x ∈ {0}
x ∈ {0}
[eva:alarm] array_sizeof.i:
9
: Warning:
[eva:alarm] array_sizeof.i:
10
: Warning:
accessing out of bounds index.
accessing out of bounds index.
assert
assert
sizeof(unsigned char [sizeof(unsigned char [1]) + sizeof(x)]) <
sizeof(unsigned char [sizeof(unsigned char [1]) + sizeof(x)]) <
(unsigned int)(sizeof(unsigned char [1]) + sizeof(int));
(unsigned int)(sizeof(unsigned char [1]) + sizeof(int));
[eva] array_sizeof.i:14: assertion 'alloca_bounds' got status valid.
[eva] array_sizeof.i:14: Call to builtin __fc_vla_alloc
[eva] array_sizeof.i:14: allocating variable __malloc_main_l14
[eva:alarm] array_sizeof.i:15: Warning:
accessing uninitialized left-value. assert \initialized(buf_0 + x);
[eva] Recording results for main
[eva] Recording results for main
[eva] done for function main
[eva] done for function main
[eva] array_sizeof.i:9: assertion 'Eva,index_bound' got final status invalid.
[eva] array_sizeof.i:10: assertion 'Eva,index_bound' got final status invalid.
[eva] array_sizeof.i:15:
assertion 'Eva,initialization' got final status invalid.
[eva] ====== VALUES COMPUTED ======
[eva] ====== VALUES COMPUTED ======
[eva:final-states] Values at end of function main:
[eva:final-states] Values at end of function main:
NON TERMINATING FUNCTION
NON TERMINATING FUNCTION
[from] Computing for function main
[from] Computing for function main
[from] Computing for function __fc_vla_alloc <-main
[from] Done for function __fc_vla_alloc
[from] Non-terminating function main (no dependencies)
[from] Non-terminating function main (no dependencies)
[from] Done for function main
[from] Done for function main
[from] ====== DEPENDENCIES COMPUTED ======
[from] ====== DEPENDENCIES COMPUTED ======
These dependencies hold at termination for the executions that terminate:
These dependencies hold at termination for the executions that terminate:
[from] Function __fc_vla_alloc:
\result FROM \nothing
[from] Function main:
[from] Function main:
NON TERMINATING - NO EFFECTS
NON TERMINATING - NO EFFECTS
[from] ====== END OF DEPENDENCIES ======
[from] ====== END OF DEPENDENCIES ======
[inout] Out (internal) for function main:
[inout] Out (internal) for function main:
tmp
x; tmp; buf_0; __lengthof_buf_0; tmp_3
[inout] Inputs for function main:
[inout] Inputs for function main:
\nothing
x; __malloc_main_l14[4]
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment