|
|
|
@ -496,27 +496,6 @@ let () =
|
|
|
|
|
CLOpt.mk_subcommand cmd ~name ?deprecated_long ~on_unknown_arg (Some command_doc) )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let abs_struct =
|
|
|
|
|
CLOpt.mk_int ~deprecated:["absstruct"] ~long:"abs-struct" ~default:1 ~meta:"int"
|
|
|
|
|
{|Specify abstraction level for fields of structs:
|
|
|
|
|
- 0 = no
|
|
|
|
|
- 1 = forget some fields during matching (and so lseg abstraction)
|
|
|
|
|
|}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and abs_val =
|
|
|
|
|
CLOpt.mk_int ~deprecated:["absval"] ~long:"abs-val" ~default:2 ~meta:"int"
|
|
|
|
|
{|Specify abstraction level for expressions:
|
|
|
|
|
- 0 = no abstraction
|
|
|
|
|
- 1 = evaluate all expressions abstractly
|
|
|
|
|
- 2 = 1 + abstract constant integer values during join
|
|
|
|
|
|}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and allow_leak =
|
|
|
|
|
CLOpt.mk_bool ~deprecated:["leak"] ~long:"allow-leak" "Forget leaked memory during abstraction"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and analyzer =
|
|
|
|
|
CLOpt.mk_symbol ~deprecated:["analyzer"; "-analyzer"; "a"] ~long:"" ~default:Checkers
|
|
|
|
|
~eq:equal_analyzer ~symbols:string_to_analyzer
|
|
|
|
@ -638,8 +617,30 @@ and append_buck_flavors =
|
|
|
|
|
$(b,--buck-compilation-database) option."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and array_level =
|
|
|
|
|
CLOpt.mk_int ~deprecated:["arraylevel"] ~long:"array-level" ~default:0 ~meta:"int"
|
|
|
|
|
let biabduction_abs_struct =
|
|
|
|
|
CLOpt.mk_int ~deprecated:["-abs-struct"] ~long:"biabduction-abs-struct" ~default:1 ~meta:"int"
|
|
|
|
|
{|Specify abstraction level for fields of structs:
|
|
|
|
|
- 0 = no
|
|
|
|
|
- 1 = forget some fields during matching (and so lseg abstraction)
|
|
|
|
|
|}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and biabduction_abs_val =
|
|
|
|
|
CLOpt.mk_int ~deprecated:["-abs-val"] ~long:"biabduction-abs-val" ~default:2 ~meta:"int"
|
|
|
|
|
{|Specify abstraction level for expressions:
|
|
|
|
|
- 0 = no abstraction
|
|
|
|
|
- 1 = evaluate all expressions abstractly
|
|
|
|
|
- 2 = 1 + abstract constant integer values during join
|
|
|
|
|
|}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and biabduction_allow_leak =
|
|
|
|
|
CLOpt.mk_bool ~deprecated:["-allow-leak"] ~long:"biabduction-allow-leak"
|
|
|
|
|
"Forget leaked memory during abstraction"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and biabduction_array_level =
|
|
|
|
|
CLOpt.mk_int ~deprecated:["-array-level"] ~long:"biabduction-array-level" ~default:0 ~meta:"int"
|
|
|
|
|
{|Level of treating the array indexing and pointer arithmetic:
|
|
|
|
|
- 0 = treats both features soundly
|
|
|
|
|
- 1 = assumes that the size of every array is infinite
|
|
|
|
@ -647,10 +648,93 @@ and array_level =
|
|
|
|
|
|}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and biabduction_iterations =
|
|
|
|
|
CLOpt.mk_int ~deprecated:["-iterations"] ~long:"biabduction-iterations" ~default:1 ~meta:"int"
|
|
|
|
|
"Specify the maximum number of operations for each function, expressed as a multiple of \
|
|
|
|
|
symbolic operations and a multiple of seconds of elapsed time"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and biabduction_join_cond =
|
|
|
|
|
CLOpt.mk_int ~deprecated:["-join-cond"] ~long:"biabduction-join-cond" ~default:1 ~meta:"int"
|
|
|
|
|
{|Set the strength of the final information-loss check used by the join:
|
|
|
|
|
- 0 = use the most aggressive join for preconditions
|
|
|
|
|
- 1 = use the least aggressive join for preconditions
|
|
|
|
|
|}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and biabduction_memleak_buckets =
|
|
|
|
|
CLOpt.mk_symbol_seq ~deprecated:["-ml-buckets"] ~long:"biabduction-memleak-buckets"
|
|
|
|
|
~default:[`MLeak_cf] ~symbols:ml_bucket_symbols ~eq:PolyVariantEqual.( = )
|
|
|
|
|
"Specify the memory leak buckets to be checked in C++."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and biabduction_models_mode =
|
|
|
|
|
CLOpt.mk_bool ~long:"biabduction-models-mode" "Analysis of the biabduction models"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and biabduction_monitor_prop_size =
|
|
|
|
|
CLOpt.mk_bool ~deprecated:["-monitor-prop-size"] ~long:"biabduction-monitor-prop-size"
|
|
|
|
|
"Monitor size of props, and print every time the current max is exceeded"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and biabduction_nelseg =
|
|
|
|
|
CLOpt.mk_bool ~deprecated:["-nelseg"] ~long:"biabduction-nelseg" "Use only nonempty lsegs"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and biabduction_only_footprint =
|
|
|
|
|
CLOpt.mk_bool ~deprecated:["-only-footprint"] ~long:"biabduction-only-footprint"
|
|
|
|
|
"Skip the re-execution phase"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and biabduction_seconds_per_iteration =
|
|
|
|
|
CLOpt.mk_float_opt ~deprecated:["-seconds-per-iteration"]
|
|
|
|
|
~long:"biabduction-seconds-per-iteration" ~meta:"float"
|
|
|
|
|
"Set the number of seconds per iteration (see $(b,--biabduction-iterations))"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and biabduction_symops_per_iteration =
|
|
|
|
|
CLOpt.mk_int_opt ~deprecated:["-symops-per-iteration"] ~long:"biabduction-symops-per-iteration"
|
|
|
|
|
~meta:"int"
|
|
|
|
|
"Set the number of symbolic operations per iteration (see $(b,--biabduction-iterations))"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and biabduction_trace_join =
|
|
|
|
|
CLOpt.mk_bool ~deprecated:["-trace-join"] ~long:"biabduction-trace-join"
|
|
|
|
|
"Detailed tracing information during prop join operations"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and biabduction_trace_rearrange =
|
|
|
|
|
CLOpt.mk_bool ~deprecated:["-trace-rearrange"] ~long:"biabduction-trace-rearrange"
|
|
|
|
|
"Detailed tracing information during prop re-arrangement operations"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and biabduction_type_size =
|
|
|
|
|
CLOpt.mk_bool ~deprecated:["-type-size"] ~long:"biabduction-type-size"
|
|
|
|
|
"Consider the size of types during analysis, e.g. cannot use an int pointer to write to a char"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and biabduction_unsafe_malloc =
|
|
|
|
|
CLOpt.mk_bool ~deprecated:["-unsafe-malloc"] ~long:"biabduction-unsafe-malloc"
|
|
|
|
|
~in_help:InferCommand.[(Analyze, manual_clang)]
|
|
|
|
|
"Assume that malloc(3) never returns null."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(** visit mode for the worklist:
|
|
|
|
|
|
|
|
|
|
- 0 depth - fist visit
|
|
|
|
|
- 1 bias towards exit node
|
|
|
|
|
- 2 least visited first *)
|
|
|
|
|
and biabduction_worklist_mode =
|
|
|
|
|
let var = ref 0 in
|
|
|
|
|
CLOpt.mk_set var 2 ~deprecated:["-coverage"] ~long:"biabduction-coverage"
|
|
|
|
|
"analysis mode to maximize coverage (can take longer)" ;
|
|
|
|
|
CLOpt.mk_set var 1 ~deprecated:["-exit-node-bias"] ~long:"biabduction-exit-node-bias"
|
|
|
|
|
"nodes nearest the exit node are analyzed first" ;
|
|
|
|
|
CLOpt.mk_set var 2 ~deprecated:["-visits-bias"] ~long:"biabduction-visits-bias"
|
|
|
|
|
"nodes visited fewer times are analyzed first" ;
|
|
|
|
|
var
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and bo_field_depth_limit =
|
|
|
|
|
CLOpt.mk_int_opt ~long:"bo-field-depth-limit"
|
|
|
|
|
~in_help:InferCommand.[(Analyze, manual_buffer_overrun)]
|
|
|
|
@ -992,14 +1076,6 @@ and cost_tests_only_autoreleasepool =
|
|
|
|
|
"[EXPERIMENTAL] Report only autoreleasepool size results in cost tests"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and siof_check_iostreams =
|
|
|
|
|
CLOpt.mk_bool ~long:"siof-check-iostreams"
|
|
|
|
|
~in_help:InferCommand.[(Analyze, manual_siof)]
|
|
|
|
|
"Do not assume that iostreams (cout, cerr, ...) are always initialized. The default is to \
|
|
|
|
|
assume they are always initialized to avoid false positives. However, if your program \
|
|
|
|
|
compiles against a recent libstdc++ then it is safe to turn this option on."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and cxx_scope_guards =
|
|
|
|
|
CLOpt.mk_json ~long:"cxx-scope-guards"
|
|
|
|
|
~in_help:InferCommand.[(Analyze, manual_clang)]
|
|
|
|
@ -1019,7 +1095,8 @@ and custom_symbols =
|
|
|
|
|
"Specify named lists of symbols available to rules"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and ( bo_debug
|
|
|
|
|
and ( biabduction_write_dotty
|
|
|
|
|
, bo_debug
|
|
|
|
|
, deduplicate
|
|
|
|
|
, developer_mode
|
|
|
|
|
, debug
|
|
|
|
@ -1040,8 +1117,7 @@ and ( bo_debug
|
|
|
|
|
, print_types
|
|
|
|
|
, reports_include_ml_loc
|
|
|
|
|
, trace_error
|
|
|
|
|
, write_html
|
|
|
|
|
, write_dotty ) =
|
|
|
|
|
, write_html ) =
|
|
|
|
|
let all_generic_manuals =
|
|
|
|
|
List.filter_map InferCommand.all_commands ~f:(fun (command : InferCommand.t) ->
|
|
|
|
|
match command with
|
|
|
|
@ -1050,7 +1126,12 @@ and ( bo_debug
|
|
|
|
|
| (Analyze | AnalyzeJson | Capture | Compile | Report | ReportDiff | Run) as command ->
|
|
|
|
|
Some (command, manual_generic) )
|
|
|
|
|
in
|
|
|
|
|
let bo_debug =
|
|
|
|
|
let biabduction_write_dotty =
|
|
|
|
|
CLOpt.mk_bool ~long:"biabduction-write-dotty"
|
|
|
|
|
~in_help:InferCommand.[(Analyze, manual_generic)]
|
|
|
|
|
(Printf.sprintf "Produce dotty files for specs and retain cycles reports in %s."
|
|
|
|
|
(ResultsDirEntryName.get_path ~results_dir:"infer-out" Debug))
|
|
|
|
|
and bo_debug =
|
|
|
|
|
CLOpt.mk_int ~default:0 ~long:"bo-debug"
|
|
|
|
|
~in_help:InferCommand.[(Analyze, manual_buffer_overrun)]
|
|
|
|
|
"Debug level for buffer-overrun checker (0-4)"
|
|
|
|
@ -1099,9 +1180,16 @@ and ( bo_debug
|
|
|
|
|
and trace_error =
|
|
|
|
|
CLOpt.mk_bool ~long:"trace-error" "Detailed tracing information during error explanation"
|
|
|
|
|
and write_html =
|
|
|
|
|
CLOpt.mk_bool ~long:"write-html" "Produce html debug output in the results directory"
|
|
|
|
|
and write_dotty =
|
|
|
|
|
CLOpt.mk_bool ~long:"write-dotty" "Produce dotty files for specs in the results directory"
|
|
|
|
|
CLOpt.mk_bool ~long:"write-html"
|
|
|
|
|
~in_help:InferCommand.[(Analyze, manual_generic)]
|
|
|
|
|
(Printf.sprintf
|
|
|
|
|
"Produce html debug output for the analyses in %s. This shows the abstract state of all \
|
|
|
|
|
analyses at each program point in the source code. Each captured source file has its own \
|
|
|
|
|
html page. This HTML file contains the source file, and at each line of\n\
|
|
|
|
|
the file there are links to the nodes of the control flow graph of Infer's translation \
|
|
|
|
|
of that line of code into its intermediate representation (SIL). This way it's possible \
|
|
|
|
|
to see what the translation is, and the details of the symbolic execution on each node."
|
|
|
|
|
(ResultsDirEntryName.get_path ~results_dir:"infer-out" Debug))
|
|
|
|
|
in
|
|
|
|
|
let set_debug_level level =
|
|
|
|
|
bo_debug := level ;
|
|
|
|
@ -1115,18 +1203,12 @@ and ( bo_debug
|
|
|
|
|
~in_help:all_generic_manuals
|
|
|
|
|
"Debug mode (also sets $(b,--debug-level 2), $(b,--developer-mode), $(b,--print-buckets), \
|
|
|
|
|
$(b,--print-types), $(b,--reports-include-ml-loc), $(b,--no-only-cheap-debug), \
|
|
|
|
|
$(b,--trace-error), $(b,--write-dotty), $(b,--write-html))"
|
|
|
|
|
$(b,--trace-error), $(b,--write-html))"
|
|
|
|
|
~f:(fun debug ->
|
|
|
|
|
if debug then set_debug_level 2 else set_debug_level 0 ;
|
|
|
|
|
CommandLineOption.keep_args_file := debug ;
|
|
|
|
|
debug )
|
|
|
|
|
[ developer_mode
|
|
|
|
|
; print_buckets
|
|
|
|
|
; print_types
|
|
|
|
|
; reports_include_ml_loc
|
|
|
|
|
; trace_error
|
|
|
|
|
; write_html
|
|
|
|
|
; write_dotty ]
|
|
|
|
|
[developer_mode; print_buckets; print_types; reports_include_ml_loc; trace_error; write_html]
|
|
|
|
|
[only_cheap_debug]
|
|
|
|
|
and (_ : int option ref) =
|
|
|
|
|
CLOpt.mk_int_opt ~long:"debug-level" ~in_help:all_generic_manuals ~meta:"level"
|
|
|
|
@ -1175,7 +1257,8 @@ and ( bo_debug
|
|
|
|
|
debug )
|
|
|
|
|
[debug; developer_mode] [default_linters; keep_going]
|
|
|
|
|
in
|
|
|
|
|
( bo_debug
|
|
|
|
|
( biabduction_write_dotty
|
|
|
|
|
, bo_debug
|
|
|
|
|
, deduplicate
|
|
|
|
|
, developer_mode
|
|
|
|
|
, debug
|
|
|
|
@ -1196,8 +1279,7 @@ and ( bo_debug
|
|
|
|
|
, print_types
|
|
|
|
|
, reports_include_ml_loc
|
|
|
|
|
, trace_error
|
|
|
|
|
, write_html
|
|
|
|
|
, write_dotty )
|
|
|
|
|
, write_html )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and dependencies =
|
|
|
|
@ -1300,6 +1382,13 @@ and eradicate_return_over_annotated =
|
|
|
|
|
|
|
|
|
|
and eradicate_verbose = CLOpt.mk_bool ~long:"eradicate-verbose" "Print initial and final typestates"
|
|
|
|
|
|
|
|
|
|
and export_changed_functions =
|
|
|
|
|
CLOpt.mk_bool ~deprecated:["test-determinator-clang"] ~long:"export-changed-functions"
|
|
|
|
|
~default:false
|
|
|
|
|
"Make infer output changed functions, similar to test-determinator. It is used together with \
|
|
|
|
|
the $(b,--modified-lines)."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and external_java_packages =
|
|
|
|
|
CLOpt.mk_string_list ~long:"external-java-packages"
|
|
|
|
|
~in_help:InferCommand.[(Analyze, manual_java)]
|
|
|
|
@ -1328,7 +1417,8 @@ and file_renamings =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and filter_paths =
|
|
|
|
|
CLOpt.mk_bool ~long:"filter-paths" ~default:true "Filters specified in .inferconfig"
|
|
|
|
|
CLOpt.mk_bool ~long:"filter-paths" ~default:true
|
|
|
|
|
"Apply filters specified in $(b,--report_*) options. Disable for debugging."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and force_delete_results_dir =
|
|
|
|
@ -1438,7 +1528,7 @@ and help_issue_type =
|
|
|
|
|
and html =
|
|
|
|
|
CLOpt.mk_bool ~long:"html"
|
|
|
|
|
~in_help:InferCommand.[(Explore, manual_explore_bugs)]
|
|
|
|
|
"Generate html report."
|
|
|
|
|
"Generate an html report of issues found."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and hoisting_report_only_expensive =
|
|
|
|
@ -1454,6 +1544,14 @@ and icfg_dotty_outfile =
|
|
|
|
|
options that would generate icfg file otherwise"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and impurity_report_immutable_modifications =
|
|
|
|
|
CLOpt.mk_bool
|
|
|
|
|
~deprecated:["-report-immutable-modifications"]
|
|
|
|
|
~long:"impurity-report-immutable-modifications" ~default:false
|
|
|
|
|
~in_help:InferCommand.[(Analyze, manual_generic)]
|
|
|
|
|
"Report modifications to immutable fields in the Impurity checker"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and inclusive_cost =
|
|
|
|
|
CLOpt.mk_bool ~long:"inclusive-cost" ~default:true "Computes the inclusive cost"
|
|
|
|
|
|
|
|
|
@ -1474,12 +1572,6 @@ and issues_tests =
|
|
|
|
|
~meta:"file" "Write a list of issues in a format suitable for tests to $(i,file)"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and iterations =
|
|
|
|
|
CLOpt.mk_int ~deprecated:["iterations"] ~long:"iterations" ~default:1 ~meta:"int"
|
|
|
|
|
"Specify the maximum number of operations for each function, expressed as a multiple of \
|
|
|
|
|
symbolic operations and a multiple of seconds of elapsed time"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and java_debug_source_file_info =
|
|
|
|
|
CLOpt.mk_path_opt ~long:"java-debug-source-file-info" ~meta:"path"
|
|
|
|
|
"For debugging only: Call the Java declarations source file parser on the given file and do \
|
|
|
|
@ -1512,14 +1604,6 @@ and jobs =
|
|
|
|
|
~meta:"int" "Run the specified number of analysis jobs simultaneously"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and join_cond =
|
|
|
|
|
CLOpt.mk_int ~deprecated:["join_cond"] ~long:"join-cond" ~default:1 ~meta:"int"
|
|
|
|
|
{|Set the strength of the final information-loss check used by the join:
|
|
|
|
|
- 0 = use the most aggressive join for preconditions
|
|
|
|
|
- 1 = use the least aggressive join for preconditions
|
|
|
|
|
|}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and liveness_dangerous_classes =
|
|
|
|
|
CLOpt.mk_json ~long:"liveness-dangerous-classes"
|
|
|
|
|
~in_help:InferCommand.[(Analyze, manual_clang)]
|
|
|
|
@ -1655,31 +1739,14 @@ and method_decls_info =
|
|
|
|
|
method name, etc.) when Infer is run Test Determinator mode with $(b,--test-determinator)."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and ml_buckets =
|
|
|
|
|
CLOpt.mk_symbol_seq ~deprecated:["ml_buckets"; "-ml_buckets"] ~long:"ml-buckets"
|
|
|
|
|
~default:[`MLeak_cf]
|
|
|
|
|
~in_help:InferCommand.[(Analyze, manual_clang)]
|
|
|
|
|
{|Specify the memory leak buckets to be checked in C++:
|
|
|
|
|
- $(b,cpp) from C++ code
|
|
|
|
|
|}
|
|
|
|
|
~symbols:ml_bucket_symbols ~eq:PolyVariantEqual.( = )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and modified_lines =
|
|
|
|
|
CLOpt.mk_path_opt ~long:"modified-lines"
|
|
|
|
|
"Specifies the file containing the modified lines when Infer is run Test Determinator mode \
|
|
|
|
|
with $(b,--test-determinator)."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and monitor_prop_size =
|
|
|
|
|
CLOpt.mk_bool ~deprecated:["monitor_prop_size"] ~long:"monitor-prop-size"
|
|
|
|
|
"Monitor size of props, and print every time the current max is exceeded"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and nelseg = CLOpt.mk_bool ~deprecated:["nelseg"] ~long:"nelseg" "Use only nonempty lsegs"
|
|
|
|
|
|
|
|
|
|
and nullable_annotation =
|
|
|
|
|
CLOpt.mk_string_opt ~long:"nullable-annotation-name" "Specify custom nullable annotation name"
|
|
|
|
|
CLOpt.mk_string_opt ~long:"nullable-annotation-name" "Specify a custom nullable annotation name."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and nullsafe_annotation_graph =
|
|
|
|
@ -1725,22 +1792,12 @@ and nullsafe_strict_containers =
|
|
|
|
|
"Warn when containers are used with nullable keys or values"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and only_footprint =
|
|
|
|
|
CLOpt.mk_bool ~deprecated:["only_footprint"] ~long:"only-footprint" "Skip the re-execution phase"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and oom_threshold =
|
|
|
|
|
CLOpt.mk_int_opt ~long:"oom-threshold"
|
|
|
|
|
"Available memory threshold (in MB) below which multi-worker scheduling throttles back work. \
|
|
|
|
|
Only for use on Linux."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and passthroughs =
|
|
|
|
|
CLOpt.mk_bool ~long:"passthroughs" ~default:false
|
|
|
|
|
"In error traces, show intermediate steps that propagate data. When false, error traces are \
|
|
|
|
|
shorter and show only direct flow via souces/sinks"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and patterns_modeled_expensive =
|
|
|
|
|
let long = "modeled-expensive" in
|
|
|
|
|
( long
|
|
|
|
@ -1869,7 +1926,8 @@ and procedures_summary_json =
|
|
|
|
|
|
|
|
|
|
and process_clang_ast =
|
|
|
|
|
CLOpt.mk_bool ~long:"process-clang-ast" ~default:false
|
|
|
|
|
"process the ast to emit some info about the file (Not available for Java)"
|
|
|
|
|
"process the ast to emit some info about the file with $(b,--test-determinator) or \
|
|
|
|
|
$(b,--export-changed-functions) (Not available for Java)"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and progress_bar =
|
|
|
|
@ -2018,6 +2076,12 @@ and quandary_sanitizers =
|
|
|
|
|
"Specify custom sanitizers for Quandary"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and quandary_show_passthroughs =
|
|
|
|
|
CLOpt.mk_bool ~deprecated:["-passthroughs"] ~long:"quandary-show-passthroughs" ~default:false
|
|
|
|
|
"In error traces, show intermediate steps that propagate data. When false, error traces are \
|
|
|
|
|
shorter and show only direct flow via souces/sinks"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and quandary_sources =
|
|
|
|
|
CLOpt.mk_json ~long:"quandary-sources"
|
|
|
|
|
~in_help:InferCommand.[(Analyze, manual_quandary)]
|
|
|
|
@ -2042,7 +2106,7 @@ and racerd_guardedby =
|
|
|
|
|
"Check @GuardedBy annotations with RacerD"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and[@warning "-32"] racerd_unknown_returns_owned =
|
|
|
|
|
and _racerd_unknown_returns_owned =
|
|
|
|
|
CLOpt.mk_bool ~deprecated:["racerd-unknown-returns-owned"] ~long:"racerd-unknown-returns-owned"
|
|
|
|
|
~default:true
|
|
|
|
|
~in_help:InferCommand.[(Analyze, manual_racerd)]
|
|
|
|
@ -2133,12 +2197,6 @@ and report_formatter =
|
|
|
|
|
~eq:PolyVariantEqual.( = ) "Which formatter to use when emitting the report"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and report_immutable_modifications =
|
|
|
|
|
CLOpt.mk_bool ~long:"report-immutable-modifications" ~default:false
|
|
|
|
|
~in_help:InferCommand.[(Report, manual_generic); (Run, manual_generic)]
|
|
|
|
|
"Report modifications to immutable fields"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and report_previous =
|
|
|
|
|
CLOpt.mk_path_opt ~long:"report-previous"
|
|
|
|
|
~in_help:InferCommand.[(ReportDiff, manual_generic)]
|
|
|
|
@ -2167,9 +2225,16 @@ and results_dir =
|
|
|
|
|
~meta:"dir" "Write results and internal files in the specified directory"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and seconds_per_iteration =
|
|
|
|
|
CLOpt.mk_float_opt ~deprecated:["seconds_per_iteration"] ~long:"seconds-per-iteration"
|
|
|
|
|
~meta:"float" "Set the number of seconds per iteration (see $(b,--iterations))"
|
|
|
|
|
and scheduler =
|
|
|
|
|
CLOpt.mk_symbol ~long:"scheduler" ~default:File ~eq:equal_scheduler
|
|
|
|
|
~in_help:InferCommand.[(Analyze, manual_generic)]
|
|
|
|
|
~symbols:[("file", File); ("restart", Restart); ("callgraph", SyntacticCallGraph)]
|
|
|
|
|
"Specify the scheduler used for the analysis phase:\n\
|
|
|
|
|
- file: schedule one job per file\n\
|
|
|
|
|
- callgraph: schedule one job per procedure, following the syntactic call graph. Usually \
|
|
|
|
|
faster than \"file\".\n\
|
|
|
|
|
- restart: same as callgraph but uses locking to try and avoid duplicate work between \
|
|
|
|
|
different analysis processes and thus performs better in some circumstances"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and select =
|
|
|
|
@ -2199,6 +2264,14 @@ and scuba_tags =
|
|
|
|
|
<name>=(<value>,<value>,<value>|NONE)"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and siof_check_iostreams =
|
|
|
|
|
CLOpt.mk_bool ~long:"siof-check-iostreams"
|
|
|
|
|
~in_help:InferCommand.[(Analyze, manual_siof)]
|
|
|
|
|
"Do not assume that iostreams (cout, cerr, ...) are always initialized. The default is to \
|
|
|
|
|
assume they are always initialized to avoid false positives. However, if your program \
|
|
|
|
|
compiles against a recent libstdc++ then it is safe to turn this option on."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and siof_safe_methods =
|
|
|
|
|
CLOpt.mk_string_list ~long:"siof-safe-methods"
|
|
|
|
|
~in_help:InferCommand.[(Analyze, manual_siof)]
|
|
|
|
@ -2352,7 +2425,7 @@ and (_ : bool ref) =
|
|
|
|
|
|
|
|
|
|
and subtype_multirange =
|
|
|
|
|
CLOpt.mk_bool ~deprecated:["subtype_multirange"] ~long:"subtype-multirange" ~default:true
|
|
|
|
|
"Use the multirange subtyping domain"
|
|
|
|
|
"Use the multirange subtyping domain. Used in the Java frontend and in biabduction."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and summaries_caches_max_size =
|
|
|
|
@ -2360,36 +2433,12 @@ and summaries_caches_max_size =
|
|
|
|
|
"The maximum amount of elements the summaries LRU caches can hold"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and symops_per_iteration =
|
|
|
|
|
CLOpt.mk_int_opt ~deprecated:["symops_per_iteration"] ~long:"symops-per-iteration" ~meta:"int"
|
|
|
|
|
"Set the number of symbolic operations per iteration (see $(b,--iterations))"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and test_determinator =
|
|
|
|
|
CLOpt.mk_bool ~long:"test-determinator" ~default:false
|
|
|
|
|
"Run infer in Test Determinator mode. It is used together with the $(b,--modified-lines) and \
|
|
|
|
|
$(b,--profiler-samples) flags, which specify the relevant arguments."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and export_changed_functions =
|
|
|
|
|
CLOpt.mk_bool ~deprecated:["test-determinator-clang"] ~long:"export-changed-functions"
|
|
|
|
|
~default:false
|
|
|
|
|
"Make infer output changed functions, similar to test-determinator. It is used together with \
|
|
|
|
|
the $(b,--modified-lines)."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and scheduler =
|
|
|
|
|
CLOpt.mk_symbol ~long:"scheduler" ~default:File ~eq:equal_scheduler
|
|
|
|
|
~in_help:InferCommand.[(Analyze, manual_generic)]
|
|
|
|
|
~symbols:[("file", File); ("restart", Restart); ("callgraph", SyntacticCallGraph)]
|
|
|
|
|
"Specify the scheduler used for the analysis phase:\n\
|
|
|
|
|
- file: schedule one job per file\n\
|
|
|
|
|
- callgraph: schedule one job per procedure, following the syntactic call graph. Usually \
|
|
|
|
|
faster than \"file\".\n\
|
|
|
|
|
- restart: same as callgraph but uses locking to try and avoid duplicate work between \
|
|
|
|
|
different analysis processes and thus performs better in some circumstances"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and test_filtering =
|
|
|
|
|
CLOpt.mk_bool ~deprecated:["test_filtering"] ~long:"test-filtering"
|
|
|
|
|
"List all the files Infer can report on (should be called from the root of the project)"
|
|
|
|
@ -2446,16 +2495,8 @@ and trace_events =
|
|
|
|
|
(ResultsDirEntryName.get_path ~results_dir:"infer-out" PerfEvents))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and trace_join =
|
|
|
|
|
CLOpt.mk_bool ~deprecated:["trace_join"] ~long:"trace-join"
|
|
|
|
|
"Detailed tracing information during prop join operations"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and trace_ondemand = CLOpt.mk_bool ~long:"trace-ondemand" ""
|
|
|
|
|
|
|
|
|
|
and trace_rearrange =
|
|
|
|
|
CLOpt.mk_bool ~deprecated:["trace_rearrange"] ~long:"trace-rearrange"
|
|
|
|
|
"Detailed tracing information during prop re-arrangement operations"
|
|
|
|
|
and trace_ondemand =
|
|
|
|
|
CLOpt.mk_bool ~long:"trace-ondemand" "Emit debug information for the ondemand analysis scheduler."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and trace_topl =
|
|
|
|
@ -2476,21 +2517,10 @@ and tv_limit_filtered =
|
|
|
|
|
"The maximum number of traces for issues filtered out by --report-filter to submit to Traceview"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and type_size =
|
|
|
|
|
CLOpt.mk_bool ~deprecated:["type_size"] ~long:"type-size"
|
|
|
|
|
"Consider the size of types during analysis, e.g. cannot use an int pointer to write to a char"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and uninit_interproc =
|
|
|
|
|
CLOpt.mk_bool ~long:"uninit-interproc" "Run uninit check in the experimental interprocedural mode"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and unsafe_malloc =
|
|
|
|
|
CLOpt.mk_bool ~long:"unsafe-malloc"
|
|
|
|
|
~in_help:InferCommand.[(Analyze, manual_clang)]
|
|
|
|
|
"Assume that malloc(3) never returns null."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and incremental_analysis =
|
|
|
|
|
CLOpt.mk_bool ~long:"incremental-analysis" ~default:false
|
|
|
|
|
"[EXPERIMENTAL] Use incremental analysis for changed files. Not compatible with \
|
|
|
|
@ -2509,21 +2539,6 @@ and version =
|
|
|
|
|
var
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(** visit mode for the worklist:
|
|
|
|
|
|
|
|
|
|
- 0 depth - fist visit
|
|
|
|
|
- 1 bias towards exit node
|
|
|
|
|
- 2 least visited first *)
|
|
|
|
|
and worklist_mode =
|
|
|
|
|
let var = ref 0 in
|
|
|
|
|
CLOpt.mk_set var 2 ~long:"coverage" "analysis mode to maximize coverage (can take longer)" ;
|
|
|
|
|
CLOpt.mk_set var 1 ~long:"exit-node-bias" ~deprecated:["exit_node_bias"]
|
|
|
|
|
"nodes nearest the exit node are analyzed first" ;
|
|
|
|
|
CLOpt.mk_set var 2 ~long:"visits-bias" ~deprecated:["visits_bias"]
|
|
|
|
|
"nodes visited fewer times are analyzed first" ;
|
|
|
|
|
var
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and workspace =
|
|
|
|
|
CLOpt.mk_path_opt ~long:"workspace"
|
|
|
|
|
~in_help:InferCommand.[(Capture, manual_generic)]
|
|
|
|
@ -2725,15 +2740,17 @@ let post_parsing_initialization command_opt =
|
|
|
|
|
Gc.set {ctrl with minor_heap_size; allocation_policy; space_overhead}
|
|
|
|
|
in
|
|
|
|
|
set_gc_params () ;
|
|
|
|
|
let symops_timeout, seconds_timeout =
|
|
|
|
|
let biabd_symops_timeout, biabd_seconds_timeout =
|
|
|
|
|
let default_symops_timeout = 1100 in
|
|
|
|
|
let default_seconds_timeout = 10.0 in
|
|
|
|
|
if !biabduction_models_mode then (* disable timeouts when analyzing models *)
|
|
|
|
|
(None, None)
|
|
|
|
|
else (Some default_symops_timeout, Some default_seconds_timeout)
|
|
|
|
|
in
|
|
|
|
|
if is_none !symops_per_iteration then symops_per_iteration := symops_timeout ;
|
|
|
|
|
if is_none !seconds_per_iteration then seconds_per_iteration := seconds_timeout ;
|
|
|
|
|
if is_none !biabduction_symops_per_iteration then
|
|
|
|
|
biabduction_symops_per_iteration := biabd_symops_timeout ;
|
|
|
|
|
if is_none !biabduction_seconds_per_iteration then
|
|
|
|
|
biabduction_seconds_per_iteration := biabd_seconds_timeout ;
|
|
|
|
|
clang_compilation_dbs :=
|
|
|
|
|
RevList.rev_map ~f:(fun x -> `Raw x) !compilation_database
|
|
|
|
|
|> RevList.rev_map_append ~f:(fun x -> `Escaped x) !compilation_database_escaped ;
|
|
|
|
@ -2777,11 +2794,43 @@ let process_linters_doc_url args =
|
|
|
|
|
|
|
|
|
|
let rest = !rest
|
|
|
|
|
|
|
|
|
|
and abs_struct = !abs_struct
|
|
|
|
|
and biabduction_abs_struct = !biabduction_abs_struct
|
|
|
|
|
|
|
|
|
|
and biabduction_abs_val = !biabduction_abs_val
|
|
|
|
|
|
|
|
|
|
and biabduction_allow_leak = !biabduction_allow_leak
|
|
|
|
|
|
|
|
|
|
and biabduction_array_level = !biabduction_array_level
|
|
|
|
|
|
|
|
|
|
and biabduction_models_mode = !biabduction_models_mode
|
|
|
|
|
|
|
|
|
|
and biabduction_iterations = !biabduction_iterations
|
|
|
|
|
|
|
|
|
|
and biabduction_join_cond = !biabduction_join_cond
|
|
|
|
|
|
|
|
|
|
and biabduction_memleak_buckets = !biabduction_memleak_buckets
|
|
|
|
|
|
|
|
|
|
and biabduction_monitor_prop_size = !biabduction_monitor_prop_size
|
|
|
|
|
|
|
|
|
|
and biabduction_nelseg = !biabduction_nelseg
|
|
|
|
|
|
|
|
|
|
and biabduction_only_footprint = !biabduction_only_footprint
|
|
|
|
|
|
|
|
|
|
and biabduction_seconds_per_iteration = !biabduction_seconds_per_iteration
|
|
|
|
|
|
|
|
|
|
and biabduction_symops_per_iteration = !biabduction_symops_per_iteration
|
|
|
|
|
|
|
|
|
|
and biabduction_trace_join = !biabduction_trace_join
|
|
|
|
|
|
|
|
|
|
and biabduction_trace_rearrange = !biabduction_trace_rearrange
|
|
|
|
|
|
|
|
|
|
and biabduction_type_size = !biabduction_type_size
|
|
|
|
|
|
|
|
|
|
and biabduction_unsafe_malloc = !biabduction_unsafe_malloc
|
|
|
|
|
|
|
|
|
|
and abs_val = !abs_val
|
|
|
|
|
and biabduction_worklist_mode = !biabduction_worklist_mode
|
|
|
|
|
|
|
|
|
|
and allow_leak = !allow_leak
|
|
|
|
|
and biabduction_write_dotty = !biabduction_write_dotty
|
|
|
|
|
|
|
|
|
|
and annotation_reachability_cxx = !annotation_reachability_cxx
|
|
|
|
|
|
|
|
|
@ -2791,10 +2840,6 @@ and annotation_reachability_custom_pairs = !annotation_reachability_custom_pairs
|
|
|
|
|
|
|
|
|
|
and append_buck_flavors = RevList.to_list !append_buck_flavors
|
|
|
|
|
|
|
|
|
|
and array_level = !array_level
|
|
|
|
|
|
|
|
|
|
and biabduction_models_mode = !biabduction_models_mode
|
|
|
|
|
|
|
|
|
|
and bootclasspath = !bootclasspath
|
|
|
|
|
|
|
|
|
|
and bo_debug = !bo_debug
|
|
|
|
@ -3040,14 +3085,16 @@ and global_tenv = !global_tenv
|
|
|
|
|
|
|
|
|
|
and icfg_dotty_outfile = !icfg_dotty_outfile
|
|
|
|
|
|
|
|
|
|
and impurity_report_immutable_modifications = !impurity_report_immutable_modifications
|
|
|
|
|
|
|
|
|
|
and inclusive_cost = !inclusive_cost
|
|
|
|
|
|
|
|
|
|
and incremental_analysis = !incremental_analysis
|
|
|
|
|
|
|
|
|
|
and issues_tests = !issues_tests
|
|
|
|
|
|
|
|
|
|
and issues_tests_fields = !issues_tests_fields
|
|
|
|
|
|
|
|
|
|
and iterations = !iterations
|
|
|
|
|
|
|
|
|
|
and java_debug_source_file_info = !java_debug_source_file_info
|
|
|
|
|
|
|
|
|
|
and java_jar_compiler = !java_jar_compiler
|
|
|
|
@ -3062,8 +3109,6 @@ and job_id = !job_id
|
|
|
|
|
|
|
|
|
|
and jobs = Option.fold !max_jobs ~init:!jobs ~f:min
|
|
|
|
|
|
|
|
|
|
and join_cond = !join_cond
|
|
|
|
|
|
|
|
|
|
and linter = !linter
|
|
|
|
|
|
|
|
|
|
and linters_def_file = RevList.to_list !linters_def_file
|
|
|
|
@ -3098,14 +3143,8 @@ and merge = !merge
|
|
|
|
|
|
|
|
|
|
and method_decls_info = !method_decls_info
|
|
|
|
|
|
|
|
|
|
and ml_buckets = !ml_buckets
|
|
|
|
|
|
|
|
|
|
and modified_lines = !modified_lines
|
|
|
|
|
|
|
|
|
|
and monitor_prop_size = !monitor_prop_size
|
|
|
|
|
|
|
|
|
|
and nelseg = !nelseg
|
|
|
|
|
|
|
|
|
|
and nullable_annotation = !nullable_annotation
|
|
|
|
|
|
|
|
|
|
and nullsafe_annotation_graph = !nullsafe_annotation_graph
|
|
|
|
@ -3132,10 +3171,6 @@ and oom_threshold = !oom_threshold
|
|
|
|
|
|
|
|
|
|
and only_cheap_debug = !only_cheap_debug
|
|
|
|
|
|
|
|
|
|
and only_footprint = !only_footprint
|
|
|
|
|
|
|
|
|
|
and passthroughs = !passthroughs
|
|
|
|
|
|
|
|
|
|
and patterns_modeled_expensive = match patterns_modeled_expensive with k, r -> (k, !r)
|
|
|
|
|
|
|
|
|
|
and patterns_never_returning_null = match patterns_never_returning_null with k, r -> (k, !r)
|
|
|
|
@ -3150,6 +3185,8 @@ and print_active_checkers = !print_active_checkers
|
|
|
|
|
|
|
|
|
|
and print_builtins = !print_builtins
|
|
|
|
|
|
|
|
|
|
and print_jbir = !print_jbir
|
|
|
|
|
|
|
|
|
|
and print_logs = !print_logs
|
|
|
|
|
|
|
|
|
|
and print_types = !print_types
|
|
|
|
@ -3255,6 +3292,8 @@ and quandary_endpoints = !quandary_endpoints
|
|
|
|
|
|
|
|
|
|
and quandary_sanitizers = !quandary_sanitizers
|
|
|
|
|
|
|
|
|
|
and quandary_show_passthroughs = !quandary_show_passthroughs
|
|
|
|
|
|
|
|
|
|
and quandary_sources = !quandary_sources
|
|
|
|
|
|
|
|
|
|
and quandary_sinks = !quandary_sinks
|
|
|
|
@ -3283,8 +3322,6 @@ and report_force_relative_path = !report_force_relative_path
|
|
|
|
|
|
|
|
|
|
and report_formatter = !report_formatter
|
|
|
|
|
|
|
|
|
|
and report_immutable_modifications = !report_immutable_modifications
|
|
|
|
|
|
|
|
|
|
and report_path_regex_blacklist = RevList.to_list !report_path_regex_blacklist
|
|
|
|
|
|
|
|
|
|
and report_path_regex_whitelist = RevList.to_list !report_path_regex_whitelist
|
|
|
|
@ -3305,8 +3342,6 @@ and scuba_normals = !scuba_normals
|
|
|
|
|
|
|
|
|
|
and scuba_tags = String.Map.map !scuba_tags ~f:(fun v -> String.split v ~on:',')
|
|
|
|
|
|
|
|
|
|
and seconds_per_iteration = !seconds_per_iteration
|
|
|
|
|
|
|
|
|
|
and select =
|
|
|
|
|
match !select with
|
|
|
|
|
| None ->
|
|
|
|
@ -3321,8 +3356,6 @@ and select =
|
|
|
|
|
|
|
|
|
|
and show_buckets = !print_buckets
|
|
|
|
|
|
|
|
|
|
and print_jbir = !print_jbir
|
|
|
|
|
|
|
|
|
|
and siof_check_iostreams = !siof_check_iostreams
|
|
|
|
|
|
|
|
|
|
and siof_safe_methods = RevList.to_list !siof_safe_methods
|
|
|
|
@ -3388,8 +3421,6 @@ and custom_symbols =
|
|
|
|
|
(Yojson.Basic.to_string !custom_symbols)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and symops_per_iteration = !symops_per_iteration
|
|
|
|
|
|
|
|
|
|
and keep_going = !keep_going
|
|
|
|
|
|
|
|
|
|
and tenv_json = !tenv_json
|
|
|
|
@ -3418,10 +3449,6 @@ and trace_events = !trace_events
|
|
|
|
|
|
|
|
|
|
and trace_ondemand = !trace_ondemand
|
|
|
|
|
|
|
|
|
|
and trace_join = !trace_join
|
|
|
|
|
|
|
|
|
|
and trace_rearrange = !trace_rearrange
|
|
|
|
|
|
|
|
|
|
and trace_topl = !trace_topl
|
|
|
|
|
|
|
|
|
|
and tv_commit = !tv_commit
|
|
|
|
@ -3430,20 +3457,10 @@ and tv_limit = !tv_limit
|
|
|
|
|
|
|
|
|
|
and tv_limit_filtered = !tv_limit_filtered
|
|
|
|
|
|
|
|
|
|
and type_size = !type_size
|
|
|
|
|
|
|
|
|
|
and uninit_interproc = !uninit_interproc
|
|
|
|
|
|
|
|
|
|
and unsafe_malloc = !unsafe_malloc
|
|
|
|
|
|
|
|
|
|
and incremental_analysis = !incremental_analysis
|
|
|
|
|
|
|
|
|
|
and worklist_mode = !worklist_mode
|
|
|
|
|
|
|
|
|
|
and workspace = !workspace
|
|
|
|
|
|
|
|
|
|
and write_dotty = !write_dotty
|
|
|
|
|
|
|
|
|
|
and write_html = !write_html
|
|
|
|
|
|
|
|
|
|
and write_html_whitelist_regex = RevList.to_list !write_html_whitelist_regex
|
|
|
|
|