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
4563cbf8
Commit
4563cbf8
authored
3 years ago
by
Basile Desloges
Browse files
Options
Downloads
Patches
Plain Diff
[eacsl] Fix init_function.c test
parent
f7806a61
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/e-acsl/tests/memory/init_function.c
+12
-6
12 additions, 6 deletions
src/plugins/e-acsl/tests/memory/init_function.c
with
12 additions
and
6 deletions
src/plugins/e-acsl/tests/memory/init_function.c
+
12
−
6
View file @
4563cbf8
/* run.config
/* run.config
COMMENT: Check
if
the instrumentation engine still adds __e_acsl_memory
init
COMMENT: Check
that
the instrumentation engine still adds __e_acsl_memory
_
init
COMMENT: i
s inserted for the case when no malloc is used but no no variable
COMMENT: i
f no variable is instrumented.
COMMENT: is required tracking
STDOPT: +"-eva-no-builtins-auto"
*/
*/
#include
<stdlib.h>
#include
<stdlib.h>
extern
size_t
__e_acsl_heap_allocation_size
;
int
main
(
void
)
{
int
main
(
void
)
{
/* @assert (__heap_allocation_size == 0); */
// The asserts check that the memory model of E-ACSL is correctly initialized
char
*
a
=
malloc
(
7
);
// and updated, but since no memory predicate is used the variable `a` does
/* @assert (__heap_allocation_size == 7); */
// not need to be instrumented (ie. no `store_block` and `delete_block` are
// generated).
/*@ assert __e_acsl_heap_allocation_size == 0; */
char
*
a
=
malloc
(
7
);
/*@ assert __e_acsl_heap_allocation_size == 7; */
}
}
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