Skip to content

Commit

Permalink
Make memsafety autotuner enable ana.arrayoob (PR #1201)
Browse files Browse the repository at this point in the history
  • Loading branch information
sim642 committed Oct 31, 2023
1 parent a2a4fa2 commit 1cf3942
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/autoTune.ml
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ let focusOnMemSafetySpecification () =
enableAnalyses uafAna
| ValidDeref -> (* Enable the memOutOfBounds analysis *)
let memOobAna = ["memOutOfBounds"] in
set_bool "ana.arrayoob" true;
print_endline "Setting \"cil.addNestedScopeAttr\" to true";
set_bool "cil.addNestedScopeAttr" true;
print_endline @@ "Specification: ValidDeref -> enabling memOutOfBounds analysis \"" ^ (String.concat ", " memOobAna) ^ "\"";
Expand All @@ -232,6 +233,7 @@ let focusOnMemSafetySpecification () =
print_endline @@ "Specification: ValidMemtrack and ValidMemcleanup -> enabling memLeak analysis \"" ^ (String.concat ", " memLeakAna) ^ "\"";
enableAnalyses memLeakAna
| MemorySafety -> (* TODO: This is a temporary solution for the memory safety category *)
set_bool "ana.arrayoob" true;
(print_endline "Setting \"cil.addNestedScopeAttr\" to true";
set_bool "cil.addNestedScopeAttr" true;
if (get_int "ana.malloc.unique_address_count") < 1 then (
Expand Down

0 comments on commit 1cf3942

Please sign in to comment.