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
04608219
Commit
04608219
authored
3 years ago
by
Andre Maroneze
Browse files
Options
Downloads
Patches
Plain Diff
[Eva] avoid crash in -eva-audit due to malformed JSON file
parent
87f3dca1
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
src/libraries/utils/json.mli
+1
-0
1 addition, 0 deletions
src/libraries/utils/json.mli
src/plugins/value/utils/eva_audit.ml
+8
-4
8 additions, 4 deletions
src/plugins/value/utils/eva_audit.ml
with
9 additions
and
4 deletions
src/libraries/utils/json.mli
+
1
−
0
View file @
04608219
...
...
@@ -178,6 +178,7 @@ val merge_array : Filepath.Normalized.t -> Yojson.Basic.t -> unit
(**
[from_file path] opens [path] and stores its JSON object in
a memory cache, to be used by the other related functions.
@raise Yojson.Json_error if [path] is a malformed JSON file.
@since Frama-C+dev
*)
val
from_file
:
Filepath
.
Normalized
.
t
->
Yojson
.
Basic
.
t
...
...
This diff is collapsed.
Click to expand it.
src/plugins/value/utils/eva_audit.ml
+
8
−
4
View file @
04608219
...
...
@@ -135,10 +135,14 @@ let check_warning_status json name (module Plugin: Log.Messages) =
(
Pretty_utils
.
pp_list
~
sep
:
", "
Format
.
pp_print_string
)
should_be_enabled
let
check_configuration
path
=
let
json
=
Json
.
from_file
path
in
check_correctness_parameters
json
;
check_warning_status
json
"Kernel"
(
module
Kernel
);
check_warning_status
json
"Eva"
(
module
Value_parameters
)
try
let
json
=
Json
.
from_file
path
in
check_correctness_parameters
json
;
check_warning_status
json
"Kernel"
(
module
Kernel
);
check_warning_status
json
"Eva"
(
module
Value_parameters
)
with
Yojson
.
Json_error
msg
->
Kernel
.
abort
"error reading JSON file %a: %s"
Filepath
.
Normalized
.
pretty
path
msg
let
print_configuration
path
=
print_correctness_parameters
path
;
...
...
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