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
87f6b633
Commit
87f6b633
authored
4 years ago
by
Julien Signoles
Browse files
Options
Downloads
Patches
Plain Diff
[e-acsl] monitor neither *alloc nor free
parent
038715b8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/e-acsl/src/project_initializer/prepare_ast.ml
+7
-3
7 additions, 3 deletions
src/plugins/e-acsl/src/project_initializer/prepare_ast.ml
with
7 additions
and
3 deletions
src/plugins/e-acsl/src/project_initializer/prepare_ast.ml
+
7
−
3
View file @
87f6b633
...
...
@@ -426,6 +426,12 @@ class prepare_visitor = object (self)
(
Extlib
.
the
self
#
current_kf
)))
&&
(* its annotations must be monitored *)
Functions
.
check
kf
))
&&
(* it is neither malloc nor free *)
(* [TODO:] this special case preserves the former behavior.
Should be generalized latter by considering only preconditions of
libc functions *)
vi
.
vname
<>
"malloc"
&&
vi
.
vname
<>
"calloc"
&&
vi
.
vname
<>
"realloc"
&&
vi
.
vname
<>
"free"
->
let
name
=
Functions
.
RTL
.
mk_gen_name
vi
.
vname
in
let
new_vi
=
Cil
.
makeGlobalVar
name
vi
.
vtype
in
...
...
@@ -437,9 +443,7 @@ class prepare_visitor = object (self)
let
kf
=
Extlib
.
the
self
#
current_kf
in
(
match
g
with
|
GFunDecl
_
->
if
not
(
Kernel_function
.
is_definition
kf
)
&&
vi
.
vname
<>
"malloc"
&&
vi
.
vname
<>
"free"
then
if
not
(
Kernel_function
.
is_definition
kf
)
then
Options
.
warning
"@[annotating undefined function `%a':@ \
the generated program may miss memory instrumentation@ \
...
...
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