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
93493dc2
Commit
93493dc2
authored
2 years ago
by
David Bühler
Browse files
Options
Downloads
Patches
Plain Diff
[Eva] Fixes a crash on recursive functions with a specification but no assigns.
parent
161b7ee4
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/eva/engine/recursion.ml
+14
-0
14 additions, 0 deletions
src/plugins/eva/engine/recursion.ml
with
14 additions
and
0 deletions
src/plugins/eva/engine/recursion.ml
+
14
−
0
View file @
93493dc2
...
@@ -44,6 +44,11 @@ let mark_unknown_requires kinstr kf funspec =
...
@@ -44,6 +44,11 @@ let mark_unknown_requires kinstr kf funspec =
in
in
List
.
iter
emit_behavior
funspec
.
spec_behavior
List
.
iter
emit_behavior
funspec
.
spec_behavior
let
need_assigns
funspec
=
match
Cil
.
find_default_behavior
funspec
with
|
None
->
true
|
Some
bhv
->
bhv
.
b_assigns
=
WritesAny
let
get_spec
kinstr
kf
=
let
get_spec
kinstr
kf
=
let
funspec
=
Annotations
.
funspec
~
populate
:
false
kf
in
let
funspec
=
Annotations
.
funspec
~
populate
:
false
kf
in
if
List
.
for_all
(
fun
b
->
b
.
b_assigns
=
WritesAny
)
funspec
.
spec_behavior
if
List
.
for_all
(
fun
b
->
b
.
b_assigns
=
WritesAny
)
funspec
.
spec_behavior
...
@@ -75,6 +80,15 @@ let get_spec kinstr kf =
...
@@ -75,6 +80,15 @@ let get_spec kinstr kf =
(
if
depth
>
0
then
Format
.
asprintf
" of depth %i"
depth
else
""
)
(
if
depth
>
0
then
Format
.
asprintf
" of depth %i"
depth
else
""
)
Kernel_function
.
pretty
kf
Kernel_function
.
pretty
kf
in
in
let
funspec
=
if
need_assigns
funspec
then
begin
ignore
(
!
Annotations
.
populate_spec_ref
kf
funspec
);
Annotations
.
funspec
~
populate
:
false
kf
end
else
funspec
in
mark_unknown_requires
kinstr
kf
funspec
;
mark_unknown_requires
kinstr
kf
funspec
;
funspec
funspec
...
...
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