Module Absint.FbPatternMatch
val is_subtype_of_fb_service_handler : IR.Tenv.t -> IR.Typ.Name.t -> bool
diff --git a/infer/documentation/issues/ERADICATE_META_CLASS_NEEDS_IMPROVEMENT.md b/infer/documentation/issues/ERADICATE_META_CLASS_NEEDS_IMPROVEMENT.md
new file mode 100644
index 000000000..707a48504
--- /dev/null
+++ b/infer/documentation/issues/ERADICATE_META_CLASS_NEEDS_IMPROVEMENT.md
@@ -0,0 +1,3 @@
+Reported when the class either:
+- has at least one nullability issue, or
+- has at least one (currently possibly hidden) issue preventing it from being marked `@Nullsafe`.
diff --git a/infer/man/man1/infer-full.txt b/infer/man/man1/infer-full.txt
index a6696147c..98a950b40 100644
--- a/infer/man/man1/infer-full.txt
+++ b/infer/man/man1/infer-full.txt
@@ -1740,7 +1740,8 @@ INTERNAL OPTIONS
empty (see linters-def-folder).
--resource-leak-lab
- Activates: checker resource-leak-lab: (Conversely:
+ Activates: checker resource-leak-lab: Toy checker for the
+ "resource leak" write-your-own-checker exercise. (Conversely:
--no-resource-leak-lab)
--scheduler { file | restart | callgraph }
diff --git a/infer/src/al/ALIssues.ml b/infer/src/al/ALIssues.ml
index 20d7a06b1..de6e1b2b6 100644
--- a/infer/src/al/ALIssues.ml
+++ b/infer/src/al/ALIssues.ml
@@ -262,8 +262,8 @@ let create_parsed_linters linters_def_file checkers : linter list =
(Config.get_linter_doc_url ~linter_id:checker.id)
issue_desc.issue_type_doc_url
in
- IssueType.register_from_string ~id:checker.id ?hum:issue_desc.issue_type_name ?doc_url
- ~linters_def_file issue_desc.severity Linters
+ IssueType.register_dynamic ~id:checker.id ?hum:issue_desc.issue_type_name ?doc_url
+ ~linters_def_file:(Some linters_def_file) issue_desc.severity Linters
in
let issue_desc =
{ CIssue.issue_type
diff --git a/infer/src/base/Checker.ml b/infer/src/base/Checker.ml
index c3c1da7e0..e76c9222f 100644
--- a/infer/src/base/Checker.ml
+++ b/infer/src/base/Checker.ml
@@ -125,7 +125,10 @@ let config_unsafe checker =
; activates= [BufferOverrunAnalysis] }
| ConfigChecksBetweenMarkers ->
{ id= "config-checks-between-markers"
- ; kind= Internal
+ ; kind=
+ UserFacing
+ { title= "Config Checks between Markers"
+ ; markdown_body= "This checker is currently only useful for certain Facebook code." }
; support= supports_java_experimental
; short_documentation= "[EXPERIMENTAL] Collects config checks between marker start and end."
; cli_flags= Some {deprecated= []; show_in_help= true}
@@ -320,9 +323,17 @@ let config_unsafe checker =
; activates= [] }
| ResourceLeakLabExercise ->
{ id= "resource-leak-lab"
- ; kind= Exercise
- ; support= (fun _ -> Support)
- ; short_documentation= ""
+ ; kind=
+ UserFacing
+ { title= "Resource Leak Lab Exercise"
+ ; markdown_body=
+ "This toy checker does nothing by default. Hack on it to make it report resource \
+ leaks! See the [lab \
+ instructions](https://github.com/facebook/infer/blob/master/infer/src/labs/README.md)."
+ }
+ ; support= (function Clang -> NoSupport | Java -> Support)
+ ; short_documentation=
+ "Toy checker for the \"resource leak\" write-your-own-checker exercise."
; cli_flags= Some {deprecated= []; show_in_help= false}
; enabled_by_default= false
; activates= [] }
diff --git a/infer/src/base/Config.ml b/infer/src/base/Config.ml
index 8bc422278..2e1970c3e 100644
--- a/infer/src/base/Config.ml
+++ b/infer/src/base/Config.ml
@@ -1177,7 +1177,7 @@ and () =
issue
| None ->
(* unknown issue type: assume it will be defined in AL *)
- IssueType.register_from_string ~id:issue_id Warning Linters
+ IssueType.register_dynamic ~id:issue_id Warning ~linters_def_file:None Linters
in
IssueType.set_enabled issue b ;
issue_id )
diff --git a/infer/src/base/IssueType.ml b/infer/src/base/IssueType.ml
index f64d50cb6..ea35d8ceb 100644
--- a/infer/src/base/IssueType.ml
+++ b/infer/src/base/IssueType.ml
@@ -49,20 +49,37 @@ module Unsafe : sig
val find_from_string : id:string -> t option
- val register_from_string :
+ val register :
+ ?enabled:bool
+ -> ?hum:string
+ -> id:string
+ -> user_documentation:string
+ -> severity
+ -> Checker.t
+ -> t
+
+ val register_hidden :
+ ?is_silent:bool
+ -> ?enabled:bool
+ -> ?hum:string
+ -> id:string
+ -> ?user_documentation:string
+ -> severity
+ -> Checker.t
+ -> t
+
+ val register_dynamic :
?enabled:bool
- -> ?is_cost_issue:bool
-> ?hum:string
-> ?doc_url:string
- -> ?linters_def_file:string
+ -> linters_def_file:string option
-> id:string
- -> ?visibility:visibility
-> ?user_documentation:string
-> severity
-> Checker.t
-> t
- val register_from_cost_string :
+ val register_cost :
?enabled:bool
-> ?is_on_ui_thread:bool
-> kind:CostKind.t
@@ -122,9 +139,8 @@ end = struct
but issues of type 2. have not yet been defined. Thus, we record only there [enabled] status
definitely. The [hum]an-readable description can be updated when we encounter the definition
of the issue type, eg in AL. *)
- let register_from_string ?(enabled = true) ?(is_cost_issue = false) ?hum:hum0 ?doc_url
- ?linters_def_file ~id:unique_id ?(visibility = User) ?user_documentation default_severity
- checker =
+ let register_static_or_dynamic ?(enabled = true) ~is_cost_issue ?hum:hum0 ~doc_url
+ ~linters_def_file ~id:unique_id ~visibility ~user_documentation default_severity checker =
match find_from_string ~id:unique_id with
| ((Some
( { unique_id= _ (* we know it has to be the same *)
@@ -179,6 +195,26 @@ end = struct
issue
+ let register ?enabled ?hum ~id ~user_documentation default_severity checker =
+ register_static_or_dynamic ?enabled ~is_cost_issue:false ~doc_url:None ~linters_def_file:None
+ ?hum ~id ~visibility:User ~user_documentation:(Some user_documentation) default_severity
+ checker
+
+
+ let register_hidden ?(is_silent = false) ?enabled ?hum ~id ?user_documentation default_severity
+ checker =
+ register_static_or_dynamic ?enabled ~is_cost_issue:false ~doc_url:None ~linters_def_file:None
+ ?hum ~id
+ ~visibility:(if is_silent then Silent else Developer)
+ ~user_documentation default_severity checker
+
+
+ let register_dynamic ?enabled ?hum ?doc_url ~linters_def_file ~id ?user_documentation
+ default_severity checker =
+ register_static_or_dynamic ?enabled ~is_cost_issue:false ?hum ~doc_url ~linters_def_file ~id
+ ~visibility:User ~user_documentation default_severity checker
+
+
let cost_issue_doc_list =
[ ( "EXECUTION_TIME_COMPLEXITY_INCREASE"
, [%blob "../../documentation/issues/EXECUTION_TIME_COMPLEXITY_INCREASE.md"] )
@@ -191,8 +227,7 @@ end = struct
(** cost issues are already registered below.*)
- let register_from_cost_string ?(enabled = true) ?(is_on_ui_thread = false) ~(kind : CostKind.t) s
- =
+ let register_cost ?(enabled = true) ?(is_on_ui_thread = false) ~(kind : CostKind.t) s =
let issue_type_base = F.asprintf s (CostKind.to_issue_string kind) in
let issue_type = if is_on_ui_thread then issue_type_base ^ "_UI_THREAD" else issue_type_base in
let user_documentation =
@@ -203,7 +238,8 @@ end = struct
L.die InternalError
"Unexpected cost issue %s: either the issue is not enabled or unknown." issue_type
in
- register_from_string ~is_cost_issue:true ~enabled ~id:issue_type Error Cost ~user_documentation
+ register_static_or_dynamic ~doc_url:None ~linters_def_file:None ~is_cost_issue:true ~enabled
+ ~id:issue_type ~visibility:User Error Cost ~user_documentation:(Some user_documentation)
let all_issues () = IssueSet.elements !all_issues
@@ -216,243 +252,234 @@ let checker_can_report reporting_checker {checker= allowed_checker} =
let abduction_case_not_implemented =
- register_from_string ~visibility:Developer ~id:"Abduction_case_not_implemented" Error Biabduction
-
+ register_hidden ~id:"Abduction_case_not_implemented" Error Biabduction
-let array_of_pointsto =
- register_from_string ~visibility:Developer ~id:"Array_of_pointsto" Error Biabduction
+let array_of_pointsto = register_hidden ~id:"Array_of_pointsto" Error Biabduction
let array_out_of_bounds_l1 =
- register_from_string ~visibility:Developer ~enabled:false ~id:"ARRAY_OUT_OF_BOUNDS_L1" Error
- Biabduction
+ register_hidden ~enabled:false ~id:"ARRAY_OUT_OF_BOUNDS_L1" Error Biabduction
let array_out_of_bounds_l2 =
- register_from_string ~visibility:Developer ~enabled:false ~id:"ARRAY_OUT_OF_BOUNDS_L2" Warning
- Biabduction
+ register_hidden ~enabled:false ~id:"ARRAY_OUT_OF_BOUNDS_L2" Warning Biabduction
let array_out_of_bounds_l3 =
- register_from_string ~visibility:Developer ~enabled:false ~id:"ARRAY_OUT_OF_BOUNDS_L3" Warning
- Biabduction
+ register_hidden ~enabled:false ~id:"ARRAY_OUT_OF_BOUNDS_L3" Warning Biabduction
-let assert_failure =
- register_from_string ~visibility:Developer ~id:"Assert_failure" Error Biabduction
-
+let assert_failure = register_hidden ~id:"Assert_failure" Error Biabduction
let _assign_pointer_warning =
- register_from_string ~id:"ASSIGN_POINTER_WARNING" Warning Linters
+ register ~id:"ASSIGN_POINTER_WARNING" Warning Linters
~user_documentation:[%blob "../../documentation/issues/ASSIGN_POINTER_WARNING.md"]
-let bad_footprint = register_from_string ~visibility:Developer ~id:"Bad_footprint" Error Biabduction
+let bad_footprint = register_hidden ~id:"Bad_footprint" Error Biabduction
let _bad_pointer_comparison =
- register_from_string ~id:"BAD_POINTER_COMPARISON" Warning Linters
+ register ~id:"BAD_POINTER_COMPARISON" Warning Linters
~user_documentation:[%blob "../../documentation/issues/BAD_POINTER_COMPARISON.md"]
let biabduction_analysis_stops =
- register_from_string ~visibility:Developer ~enabled:false ~id:"BIABDUCTION_ANALYSIS_STOPS" Warning
- Biabduction
+ register_hidden ~enabled:false ~id:"BIABDUCTION_ANALYSIS_STOPS" Warning Biabduction
let buffer_overrun_l1 =
- register_from_string ~id:"BUFFER_OVERRUN_L1" Error BufferOverrunChecker
+ register ~id:"BUFFER_OVERRUN_L1" Error BufferOverrunChecker
~user_documentation:[%blob "../../documentation/issues/BUFFER_OVERRUN.md"]
let buffer_overrun_l2 =
- register_from_string ~id:"BUFFER_OVERRUN_L2" Error BufferOverrunChecker
+ register ~id:"BUFFER_OVERRUN_L2" Error BufferOverrunChecker
~user_documentation:"See [BUFFER_OVERRUN_L1](#buffer_overrun_l1)"
let buffer_overrun_l3 =
- register_from_string ~id:"BUFFER_OVERRUN_L3" Error BufferOverrunChecker
+ register ~id:"BUFFER_OVERRUN_L3" Error BufferOverrunChecker
~user_documentation:"See [BUFFER_OVERRUN_L1](#buffer_overrun_l1)"
let buffer_overrun_l4 =
- register_from_string ~enabled:false ~id:"BUFFER_OVERRUN_L4" Error BufferOverrunChecker
+ register ~enabled:false ~id:"BUFFER_OVERRUN_L4" Error BufferOverrunChecker
~user_documentation:"See [BUFFER_OVERRUN_L1](#buffer_overrun_l1)"
let buffer_overrun_l5 =
- register_from_string ~enabled:false ~id:"BUFFER_OVERRUN_L5" Error BufferOverrunChecker
+ register ~enabled:false ~id:"BUFFER_OVERRUN_L5" Error BufferOverrunChecker
~user_documentation:"See [BUFFER_OVERRUN_L1](#buffer_overrun_l1)"
let buffer_overrun_s2 =
- register_from_string ~id:"BUFFER_OVERRUN_S2" Error BufferOverrunChecker
+ register ~id:"BUFFER_OVERRUN_S2" Error BufferOverrunChecker
~user_documentation:"See [BUFFER_OVERRUN_L1](#buffer_overrun_l1)"
let buffer_overrun_u5 =
- register_from_string ~enabled:false ~id:"BUFFER_OVERRUN_U5" Error BufferOverrunChecker
+ register ~enabled:false ~id:"BUFFER_OVERRUN_U5" Error BufferOverrunChecker
~user_documentation:"See [BUFFER_OVERRUN_L1](#buffer_overrun_l1)"
-let cannot_star = register_from_string ~visibility:Developer ~id:"Cannot_star" Error Biabduction
+let cannot_star = register_hidden ~id:"Cannot_star" Error Biabduction
let captured_strong_self =
- register_from_string ~id:"CAPTURED_STRONG_SELF" ~hum:"Captured strongSelf" Error SelfInBlock
+ register ~id:"CAPTURED_STRONG_SELF" ~hum:"Captured strongSelf" Error SelfInBlock
~user_documentation:[%blob "../../documentation/issues/CAPTURED_STRONG_SELF.md"]
let checkers_allocates_memory =
- register_from_string ~id:"CHECKERS_ALLOCATES_MEMORY" ~hum:"Allocates Memory" Error
- AnnotationReachability
+ register ~id:"CHECKERS_ALLOCATES_MEMORY" ~hum:"Allocates Memory" Error AnnotationReachability
~user_documentation:[%blob "../../documentation/issues/CHECKERS_ALLOCATES_MEMORY.md"]
let checkers_annotation_reachability_error =
- register_from_string ~id:"CHECKERS_ANNOTATION_REACHABILITY_ERROR"
- ~hum:"Annotation Reachability Error" Error AnnotationReachability
+ register ~id:"CHECKERS_ANNOTATION_REACHABILITY_ERROR" ~hum:"Annotation Reachability Error" Error
+ AnnotationReachability
~user_documentation:
[%blob "../../documentation/issues/CHECKERS_ANNOTATION_REACHABILITY_ERROR.md"]
let checkers_calls_expensive_method =
- register_from_string ~id:"CHECKERS_CALLS_EXPENSIVE_METHOD" ~hum:"Expensive Method Called" Error
+ register ~id:"CHECKERS_CALLS_EXPENSIVE_METHOD" ~hum:"Expensive Method Called" Error
AnnotationReachability
~user_documentation:[%blob "../../documentation/issues/CHECKERS_CALLS_EXPENSIVE_METHOD.md"]
let checkers_expensive_overrides_unexpensive =
- register_from_string ~id:"CHECKERS_EXPENSIVE_OVERRIDES_UNANNOTATED"
- ~hum:"Expensive Overrides Unannotated" Error AnnotationReachability
+ register ~id:"CHECKERS_EXPENSIVE_OVERRIDES_UNANNOTATED" ~hum:"Expensive Overrides Unannotated"
+ Error AnnotationReachability
~user_documentation:
[%blob "../../documentation/issues/CHECKERS_EXPENSIVE_OVERRIDES_UNANNOTATED.md"]
let checkers_fragment_retain_view =
- register_from_string ~id:"CHECKERS_FRAGMENT_RETAINS_VIEW" ~hum:"Fragment Retains View" Warning
+ register ~id:"CHECKERS_FRAGMENT_RETAINS_VIEW" ~hum:"Fragment Retains View" Warning
FragmentRetainsView
~user_documentation:[%blob "../../documentation/issues/CHECKERS_FRAGMENT_RETAINS_VIEW.md"]
let checkers_immutable_cast =
- register_from_string ~id:"CHECKERS_IMMUTABLE_CAST" Warning ImmutableCast
+ register ~id:"CHECKERS_IMMUTABLE_CAST" Warning ImmutableCast
~user_documentation:[%blob "../../documentation/issues/CHECKERS_IMMUTABLE_CAST.md"]
let checkers_printf_args =
- register_from_string ~id:"CHECKERS_PRINTF_ARGS" Error PrintfArgs
+ register ~id:"CHECKERS_PRINTF_ARGS" Error PrintfArgs
~user_documentation:[%blob "../../documentation/issues/CHECKERS_PRINTF_ARGS.md"]
let class_cast_exception =
- register_from_string ~visibility:Developer ~enabled:false ~id:"CLASS_CAST_EXCEPTION" Error
- Biabduction
+ register_hidden ~enabled:false ~id:"CLASS_CAST_EXCEPTION" Error Biabduction
let component_factory_function =
- register_from_string ~id:"COMPONENT_FACTORY_FUNCTION" Advice Linters
+ register ~id:"COMPONENT_FACTORY_FUNCTION" Advice Linters
~user_documentation:[%blob "../../documentation/issues/COMPONENT_FACTORY_FUNCTION.md"]
let component_file_cyclomatic_complexity =
- register_from_string ~id:"COMPONENT_FILE_CYCLOMATIC_COMPLEXITY" Info Linters
+ register ~id:"COMPONENT_FILE_CYCLOMATIC_COMPLEXITY" Info Linters ~user_documentation:""
let component_file_line_count =
- register_from_string ~enabled:false ~id:"COMPONENT_FILE_LINE_COUNT" Info Linters
+ register ~enabled:false ~id:"COMPONENT_FILE_LINE_COUNT" Info Linters ~user_documentation:""
let component_initializer_with_side_effects =
- register_from_string ~id:"COMPONENT_INITIALIZER_WITH_SIDE_EFFECTS" Advice Linters
+ register ~id:"COMPONENT_INITIALIZER_WITH_SIDE_EFFECTS" Advice Linters
~user_documentation:
[%blob "../../documentation/issues/COMPONENT_INITIALIZER_WITH_SIDE_EFFECTS.md"]
let component_with_multiple_factory_methods =
- register_from_string ~id:"COMPONENT_WITH_MULTIPLE_FACTORY_METHODS" Advice Linters
+ register ~id:"COMPONENT_WITH_MULTIPLE_FACTORY_METHODS" Advice Linters
~user_documentation:
[%blob "../../documentation/issues/COMPONENT_WITH_MULTIPLE_FACTORY_METHODS.md"]
let component_with_unconventional_superclass =
- register_from_string ~id:"COMPONENT_WITH_UNCONVENTIONAL_SUPERCLASS" Advice Linters
+ register ~id:"COMPONENT_WITH_UNCONVENTIONAL_SUPERCLASS" Advice Linters
~user_documentation:
[%blob "../../documentation/issues/COMPONENT_WITH_UNCONVENTIONAL_SUPERCLASS.md"]
let condition_always_false =
- register_from_string ~enabled:false ~id:"CONDITION_ALWAYS_FALSE" Warning BufferOverrunChecker
+ register ~enabled:false ~id:"CONDITION_ALWAYS_FALSE" Warning BufferOverrunChecker
~user_documentation:"A condition expression is **always** evaluated to false."
let condition_always_true =
- register_from_string ~enabled:false ~id:"CONDITION_ALWAYS_TRUE" Warning BufferOverrunChecker
+ register ~enabled:false ~id:"CONDITION_ALWAYS_TRUE" Warning BufferOverrunChecker
~user_documentation:"A condition expression is **always** evaluated to true."
-(* ~user_documentation:"A config checking is done between a marker's start and end" *)
let config_checks_between_markers =
- register_from_string ~enabled:false ~id:"CONFIG_CHECKS_BETWEEN_MARKERS" Advice
- ConfigChecksBetweenMarkers
+ register ~enabled:false ~id:"CONFIG_CHECKS_BETWEEN_MARKERS" Advice ConfigChecksBetweenMarkers
+ ~user_documentation:"A config checking is done between a marker's start and end"
let constant_address_dereference =
- register_from_string ~enabled:false ~id:"CONSTANT_ADDRESS_DEREFERENCE" Warning Pulse
+ register ~enabled:false ~id:"CONSTANT_ADDRESS_DEREFERENCE" Warning Pulse
~user_documentation:[%blob "../../documentation/issues/CONSTANT_ADDRESS_DEREFERENCE.md"]
let create_intent_from_uri =
- register_from_string ~id:"CREATE_INTENT_FROM_URI" Error Quandary
+ register ~id:"CREATE_INTENT_FROM_URI" Error Quandary
~user_documentation:
"Create an intent/start a component using a (possibly user-controlled) URI. may or may not \
be an issue depending on where the URI comes from."
let cross_site_scripting =
- register_from_string ~id:"CROSS_SITE_SCRIPTING" Error Quandary
+ register ~id:"CROSS_SITE_SCRIPTING" Error Quandary
~user_documentation:"Untrusted data flows into HTML; XSS risk."
let _cxx_reference_captured_in_objc_block =
- register_from_string ~id:"CXX_REFERENCE_CAPTURED_IN_OBJC_BLOCK" Warning Linters
+ register ~id:"CXX_REFERENCE_CAPTURED_IN_OBJC_BLOCK" Warning Linters
~user_documentation:[%blob "../../documentation/issues/CXX_REFERENCE_CAPTURED_IN_OBJC_BLOCK.md"]
let dangling_pointer_dereference =
- register_from_string ~enabled:false ~id:"DANGLING_POINTER_DEREFERENCE" Error Biabduction
+ register ~enabled:false ~id:"DANGLING_POINTER_DEREFERENCE" Error Biabduction (* TODO *)
+ ~user_documentation:""
let dangling_pointer_dereference_maybe =
- register_from_string ~visibility:Developer ~enabled:false ~id:"DANGLING_POINTER_DEREFERENCE_MAYBE"
- Warning Biabduction
+ register_hidden ~enabled:false ~id:"DANGLING_POINTER_DEREFERENCE_MAYBE" Warning Biabduction
let dead_store =
- register_from_string ~id:"DEAD_STORE" Error Liveness
+ register ~id:"DEAD_STORE" Error Liveness
~user_documentation:[%blob "../../documentation/issues/DEAD_STORE.md"]
let deadlock =
- register_from_string ~id:"DEADLOCK" Error Starvation
+ register ~id:"DEADLOCK" Error Starvation
~user_documentation:[%blob "../../documentation/issues/DEADLOCK.md"]
let _direct_atomic_property_access =
- register_from_string ~id:"DIRECT_ATOMIC_PROPERTY_ACCESS" Warning Linters
+ register ~id:"DIRECT_ATOMIC_PROPERTY_ACCESS" Warning Linters
~user_documentation:[%blob "../../documentation/issues/DIRECT_ATOMIC_PROPERTY_ACCESS.md"]
let _discouraged_weak_property_custom_setter =
- register_from_string ~id:"DISCOURAGED_WEAK_PROPERTY_CUSTOM_SETTER" Warning Linters
+ register ~id:"DISCOURAGED_WEAK_PROPERTY_CUSTOM_SETTER" Warning Linters
~user_documentation:
[%blob "../../documentation/issues/DISCOURAGED_WEAK_PROPERTY_CUSTOM_SETTER.md"]
-let divide_by_zero = register_from_string ~enabled:false ~id:"DIVIDE_BY_ZERO" Error Biabduction
+let divide_by_zero =
+ register ~enabled:false ~id:"DIVIDE_BY_ZERO" Error Biabduction (* TODO *) ~user_documentation:""
+
-let do_not_report = register_from_string ~id:"DO_NOT_REPORT" Error Quandary
+let do_not_report = register_hidden ~id:"DO_NOT_REPORT" Error Quandary
let empty_vector_access =
- register_from_string ~id:"EMPTY_VECTOR_ACCESS" Error Biabduction
+ register ~id:"EMPTY_VECTOR_ACCESS" Error Biabduction
~user_documentation:[%blob "../../documentation/issues/EMPTY_VECTOR_ACCESS.md"]
@@ -462,541 +489,524 @@ let empty_vector_access =
Until it is made non-precise, it is recommended to not turn this warning on. But even when it is
on, this should not be more than advice. *)
let eradicate_condition_redundant =
- register_from_string ~id:"ERADICATE_CONDITION_REDUNDANT" ~hum:"Condition Redundant" Advice
- Eradicate
+ register ~id:"ERADICATE_CONDITION_REDUNDANT" ~hum:"Condition Redundant" Advice Eradicate
~user_documentation:[%blob "../../documentation/issues/ERADICATE_CONDITION_REDUNDANT.md"]
let eradicate_field_not_initialized =
- register_from_string ~id:"ERADICATE_FIELD_NOT_INITIALIZED" ~hum:"Field Not Initialized" Warning
- Eradicate
+ register ~id:"ERADICATE_FIELD_NOT_INITIALIZED" ~hum:"Field Not Initialized" Warning Eradicate
~user_documentation:[%blob "../../documentation/issues/ERADICATE_FIELD_NOT_INITIALIZED.md"]
let eradicate_field_not_nullable =
- register_from_string ~id:"ERADICATE_FIELD_NOT_NULLABLE" ~hum:"Field Not Nullable" Warning
- Eradicate
+ register ~id:"ERADICATE_FIELD_NOT_NULLABLE" ~hum:"Field Not Nullable" Warning Eradicate
~user_documentation:[%blob "../../documentation/issues/ERADICATE_FIELD_NOT_NULLABLE.md"]
(* Very non-precise issue. Should be actually turned off unless for experimental purposes. *)
let eradicate_field_over_annotated =
- register_from_string ~id:"ERADICATE_FIELD_OVER_ANNOTATED" ~hum:"Field Over Annotated" Advice
- Eradicate
+ register ~id:"ERADICATE_FIELD_OVER_ANNOTATED" ~hum:"Field Over Annotated" Advice
+ Eradicate (* TODO *) ~user_documentation:""
let eradicate_inconsistent_subclass_parameter_annotation =
- register_from_string ~id:"ERADICATE_INCONSISTENT_SUBCLASS_PARAMETER_ANNOTATION"
+ register ~id:"ERADICATE_INCONSISTENT_SUBCLASS_PARAMETER_ANNOTATION"
~hum:"Inconsistent Subclass Parameter Annotation" Warning Eradicate
~user_documentation:
[%blob "../../documentation/issues/ERADICATE_INCONSISTENT_SUBCLASS_PARAMETER_ANNOTATION.md"]
let eradicate_inconsistent_subclass_return_annotation =
- register_from_string ~id:"ERADICATE_INCONSISTENT_SUBCLASS_RETURN_ANNOTATION"
+ register ~id:"ERADICATE_INCONSISTENT_SUBCLASS_RETURN_ANNOTATION"
~hum:"Inconsistent Subclass Return Annotation" Warning Eradicate
~user_documentation:
[%blob "../../documentation/issues/ERADICATE_INCONSISTENT_SUBCLASS_RETURN_ANNOTATION.md"]
let eradicate_redundant_nested_class_annotation =
- register_from_string ~id:"ERADICATE_REDUNDANT_NESTED_CLASS_ANNOTATION"
- ~hum:"@Nullsafe annotation is redundant" Advice Eradicate
+ register ~id:"ERADICATE_REDUNDANT_NESTED_CLASS_ANNOTATION"
+ ~hum:"@Nullsafe annotation is redundant" Advice Eradicate (* TODO *) ~user_documentation:""
let eradicate_bad_nested_class_annotation =
- register_from_string ~id:"ERADICATE_BAD_NESTED_CLASS_ANNOTATION"
- ~hum:"@Nullsafe annotation is inconsistent with outer class" Warning Eradicate
+ register ~id:"ERADICATE_BAD_NESTED_CLASS_ANNOTATION"
+ ~hum:"@Nullsafe annotation is inconsistent with outer class" Warning Eradicate (* TODO *)
+ ~user_documentation:""
let eradicate_nullable_dereference =
- register_from_string ~id:"ERADICATE_NULLABLE_DEREFERENCE" ~hum:"Nullable Dereference" Warning
- Eradicate
+ register ~id:"ERADICATE_NULLABLE_DEREFERENCE" ~hum:"Nullable Dereference" Warning
+ Eradicate (* TODO *) ~user_documentation:""
let eradicate_parameter_not_nullable =
- register_from_string ~id:"ERADICATE_PARAMETER_NOT_NULLABLE" ~hum:"Parameter Not Nullable" Warning
- Eradicate
+ register ~id:"ERADICATE_PARAMETER_NOT_NULLABLE" ~hum:"Parameter Not Nullable" Warning Eradicate
~user_documentation:[%blob "../../documentation/issues/ERADICATE_PARAMETER_NOT_NULLABLE.md"]
let eradicate_return_not_nullable =
- register_from_string ~id:"ERADICATE_RETURN_NOT_NULLABLE" ~hum:"Return Not Nullable" Warning
- Eradicate
+ register ~id:"ERADICATE_RETURN_NOT_NULLABLE" ~hum:"Return Not Nullable" Warning Eradicate
~user_documentation:[%blob "../../documentation/issues/ERADICATE_RETURN_NOT_NULLABLE.md"]
(* Very non-precise issue. Should be actually turned off unless for experimental purposes. *)
let eradicate_return_over_annotated =
- register_from_string ~id:"ERADICATE_RETURN_OVER_ANNOTATED" ~hum:"Return Over Annotated" Advice
- Eradicate
+ register ~id:"ERADICATE_RETURN_OVER_ANNOTATED" ~hum:"Return Over Annotated" Advice Eradicate
~user_documentation:[%blob "../../documentation/issues/ERADICATE_RETURN_OVER_ANNOTATED.md"]
let eradicate_unchecked_usage_in_nullsafe =
- register_from_string ~id:"ERADICATE_UNCHECKED_USAGE_IN_NULLSAFE"
- ~hum:"Nullsafe mode: unchecked usage of a value" Warning Eradicate
+ register ~id:"ERADICATE_UNCHECKED_USAGE_IN_NULLSAFE"
+ ~hum:"Nullsafe mode: unchecked usage of a value" Warning Eradicate (* TODO *)
+ ~user_documentation:""
let eradicate_unvetted_third_party_in_nullsafe =
- register_from_string ~id:"ERADICATE_UNVETTED_THIRD_PARTY_IN_NULLSAFE"
- ~hum:"Nullsafe mode: unchecked usage of unvetted third-party" Warning Eradicate
+ register ~id:"ERADICATE_UNVETTED_THIRD_PARTY_IN_NULLSAFE"
+ ~hum:"Nullsafe mode: unchecked usage of unvetted third-party" Warning Eradicate (* TODO *)
+ ~user_documentation:""
(* Meta issues in eradicate are technical issues reflecting null-safety state of classes in general,
in contrast with concrete nullability type violations *)
let eradicate_meta_class_is_nullsafe =
- register_from_string ~id:"ERADICATE_META_CLASS_IS_NULLSAFE"
+ register ~id:"ERADICATE_META_CLASS_IS_NULLSAFE"
~hum:
"Class is marked @Nullsafe and has 0 issues" (* Should be enabled for special integrations *)
- ~enabled:false Info Eradicate
+ ~enabled:false Info Eradicate (* TODO *) ~user_documentation:""
-(* Class is either:
- - has at least one nullability issue.
- - has at least one (currently possibly hidden) issue in order to be marked as @Nullsafe.
- *)
let eradicate_meta_class_needs_improvement =
- register_from_string ~id:"ERADICATE_META_CLASS_NEEDS_IMPROVEMENT"
+ register ~id:"ERADICATE_META_CLASS_NEEDS_IMPROVEMENT"
~hum:
"Class needs improvement to become @Nullsafe" (* Should be enabled for special integrations *)
~enabled:false Info Eradicate
+ ~user_documentation:
+ [%blob "../../documentation/issues/ERADICATE_META_CLASS_NEEDS_IMPROVEMENT.md"]
let eradicate_meta_class_can_be_nullsafe =
- register_from_string ~id:"ERADICATE_META_CLASS_CAN_BE_NULLSAFE"
+ register ~id:"ERADICATE_META_CLASS_CAN_BE_NULLSAFE"
~hum:
"Class has 0 issues and can be marked @Nullsafe"
- (* Should be enabled for special integrations *) ~enabled:false Advice Eradicate
+ (* Should be enabled for special integrations *) ~enabled:false Advice Eradicate (* TODO *)
+ ~user_documentation:""
let exposed_insecure_intent_handling =
- register_from_string ~id:"EXPOSED_INSECURE_INTENT_HANDLING" Error Quandary
- ~user_documentation:"Undocumented."
+ register ~id:"EXPOSED_INSECURE_INTENT_HANDLING" Error Quandary ~user_documentation:"Undocumented."
-let failure_exe = register_from_string ~visibility:Silent ~id:"Failure_exe" Info Biabduction
+let failure_exe = register_hidden ~is_silent:true ~id:"Failure_exe" Info Biabduction
let field_not_null_checked =
- register_from_string ~id:"IVAR_NOT_NULL_CHECKED" Warning Biabduction
+ register ~id:"IVAR_NOT_NULL_CHECKED" Warning Biabduction
~user_documentation:[%blob "../../documentation/issues/IVAR_NOT_NULL_CHECKED.md"]
(* from AL default linters *)
let _global_variable_initialized_with_function_or_method_call =
- register_from_string ~enabled:false ~id:"GLOBAL_VARIABLE_INITIALIZED_WITH_FUNCTION_OR_METHOD_CALL"
- Warning Linters
+ register ~enabled:false ~id:"GLOBAL_VARIABLE_INITIALIZED_WITH_FUNCTION_OR_METHOD_CALL" Warning
+ Linters
~user_documentation:
[%blob
"../../documentation/issues/GLOBAL_VARIABLE_INITIALIZED_WITH_FUNCTION_OR_METHOD_CALL.md"]
let guardedby_violation_racerd =
- register_from_string Warning ~id:"GUARDEDBY_VIOLATION" ~hum:"GuardedBy Violation" RacerD
+ register Warning ~id:"GUARDEDBY_VIOLATION" ~hum:"GuardedBy Violation" RacerD
~user_documentation:[%blob "../../documentation/issues/GUARDEDBY_VIOLATION.md"]
let impure_function =
- register_from_string ~id:"IMPURE_FUNCTION" Error Impurity
+ register ~id:"IMPURE_FUNCTION" Error Impurity
~user_documentation:[%blob "../../documentation/issues/IMPURE_FUNCTION.md"]
let inefficient_keyset_iterator =
- register_from_string ~id:"INEFFICIENT_KEYSET_ITERATOR" Error InefficientKeysetIterator
+ register ~id:"INEFFICIENT_KEYSET_ITERATOR" Error InefficientKeysetIterator
~user_documentation:[%blob "../../documentation/issues/INEFFICIENT_KEYSET_ITERATOR.md"]
let inferbo_alloc_is_big =
- register_from_string ~id:"INFERBO_ALLOC_IS_BIG" Error BufferOverrunChecker
+ register ~id:"INFERBO_ALLOC_IS_BIG" Error BufferOverrunChecker
~user_documentation:"`malloc` is passed a large constant value."
let inferbo_alloc_is_negative =
- register_from_string ~id:"INFERBO_ALLOC_IS_NEGATIVE" Error BufferOverrunChecker
+ register ~id:"INFERBO_ALLOC_IS_NEGATIVE" Error BufferOverrunChecker
~user_documentation:"`malloc` is called with a negative size."
let inferbo_alloc_is_zero =
- register_from_string ~id:"INFERBO_ALLOC_IS_ZERO" Error BufferOverrunChecker
+ register ~id:"INFERBO_ALLOC_IS_ZERO" Error BufferOverrunChecker
~user_documentation:"`malloc` is called with a zero size."
let inferbo_alloc_may_be_big =
- register_from_string ~id:"INFERBO_ALLOC_MAY_BE_BIG" Error BufferOverrunChecker
+ register ~id:"INFERBO_ALLOC_MAY_BE_BIG" Error BufferOverrunChecker
~user_documentation:"`malloc` *may* be called with a large value."
let inferbo_alloc_may_be_negative =
- register_from_string ~id:"INFERBO_ALLOC_MAY_BE_NEGATIVE" Error BufferOverrunChecker
+ register ~id:"INFERBO_ALLOC_MAY_BE_NEGATIVE" Error BufferOverrunChecker
~user_documentation:"`malloc` *may* be called with a negative value."
-let infinite_cost_call ~kind = register_from_cost_string ~enabled:false "INFINITE_%s" ~kind
+let infinite_cost_call ~kind = register_cost ~enabled:false "INFINITE_%s" ~kind
let inherently_dangerous_function =
- register_from_string ~visibility:Developer ~id:"INHERENTLY_DANGEROUS_FUNCTION" Warning Biabduction
+ register_hidden ~id:"INHERENTLY_DANGEROUS_FUNCTION" Warning Biabduction
let insecure_intent_handling =
- register_from_string ~id:"INSECURE_INTENT_HANDLING" Error Quandary
- ~user_documentation:"Undocumented."
+ register ~id:"INSECURE_INTENT_HANDLING" Error Quandary ~user_documentation:"Undocumented."
let integer_overflow_l1 =
- register_from_string ~id:"INTEGER_OVERFLOW_L1" Error BufferOverrunChecker
+ register ~id:"INTEGER_OVERFLOW_L1" Error BufferOverrunChecker
~user_documentation:[%blob "../../documentation/issues/INTEGER_OVERFLOW.md"]
let integer_overflow_l2 =
- register_from_string ~id:"INTEGER_OVERFLOW_L2" Error BufferOverrunChecker
+ register ~id:"INTEGER_OVERFLOW_L2" Error BufferOverrunChecker
~user_documentation:"See [INTEGER_OVERFLOW_L1](#integer_overflow_l1)"
let integer_overflow_l5 =
- register_from_string ~enabled:false ~id:"INTEGER_OVERFLOW_L5" Error BufferOverrunChecker
+ register ~enabled:false ~id:"INTEGER_OVERFLOW_L5" Error BufferOverrunChecker
~user_documentation:"See [INTEGER_OVERFLOW_L1](#integer_overflow_l1)"
let integer_overflow_u5 =
- register_from_string ~enabled:false ~id:"INTEGER_OVERFLOW_U5" Error BufferOverrunChecker
+ register ~enabled:false ~id:"INTEGER_OVERFLOW_U5" Error BufferOverrunChecker
~user_documentation:"See [INTEGER_OVERFLOW_L1](#integer_overflow_l1)"
let interface_not_thread_safe =
- register_from_string Warning ~id:"INTERFACE_NOT_THREAD_SAFE" RacerD
+ register Warning ~id:"INTERFACE_NOT_THREAD_SAFE" RacerD
~user_documentation:[%blob "../../documentation/issues/INTERFACE_NOT_THREAD_SAFE.md"]
-let internal_error =
- register_from_string ~visibility:Developer ~id:"Internal_error" Error Biabduction
-
+let internal_error = register_hidden ~id:"Internal_error" Error Biabduction
let invariant_call =
- register_from_string ~enabled:false ~id:"INVARIANT_CALL" Error LoopHoisting
+ register ~enabled:false ~id:"INVARIANT_CALL" Error LoopHoisting
~user_documentation:[%blob "../../documentation/issues/INVARIANT_CALL.md"]
let javascript_injection =
- register_from_string ~id:"JAVASCRIPT_INJECTION" Error Quandary
+ register ~id:"JAVASCRIPT_INJECTION" Error Quandary
~user_documentation:"Untrusted data flows into JavaScript."
-let lab_resource_leak = register_from_string ~id:"LAB_RESOURCE_LEAK" Error ResourceLeakLabExercise
+let lab_resource_leak =
+ register ~id:"LAB_RESOURCE_LEAK" Error ResourceLeakLabExercise ~user_documentation:"Toy issue."
-let leak_after_array_abstraction =
- register_from_string ~visibility:Developer ~id:"Leak_after_array_abstraction" Error Biabduction
+let leak_after_array_abstraction =
+ register_hidden ~id:"Leak_after_array_abstraction" Error Biabduction
-let leak_in_footprint =
- register_from_string ~visibility:Developer ~id:"Leak_in_footprint" Error Biabduction
+let leak_in_footprint = register_hidden ~id:"Leak_in_footprint" Error Biabduction
-let leak_unknown_origin =
- register_from_string ~visibility:Developer ~enabled:false ~id:"Leak_unknown_origin" Error
- Biabduction
-
+let leak_unknown_origin = register_hidden ~enabled:false ~id:"Leak_unknown_origin" Error Biabduction
let lock_consistency_violation =
- register_from_string Warning ~id:"LOCK_CONSISTENCY_VIOLATION" RacerD
+ register Warning ~id:"LOCK_CONSISTENCY_VIOLATION" RacerD
~user_documentation:[%blob "../../documentation/issues/LOCK_CONSISTENCY_VIOLATION.md"]
let lockless_violation =
- register_from_string ~id:"LOCKLESS_VIOLATION" Error Starvation
+ register ~id:"LOCKLESS_VIOLATION" Error Starvation
~user_documentation:[%blob "../../documentation/issues/LOCKLESS_VIOLATION.md"]
let logging_private_data =
- register_from_string ~id:"LOGGING_PRIVATE_DATA" Error Quandary ~user_documentation:"Undocumented."
+ register ~id:"LOGGING_PRIVATE_DATA" Error Quandary ~user_documentation:"Undocumented."
let expensive_loop_invariant_call =
- register_from_string ~id:"EXPENSIVE_LOOP_INVARIANT_CALL" Error LoopHoisting
+ register ~id:"EXPENSIVE_LOOP_INVARIANT_CALL" Error LoopHoisting
~user_documentation:[%blob "../../documentation/issues/EXPENSIVE_LOOP_INVARIANT_CALL.md"]
let memory_leak =
- register_from_string ~enabled:false ~id:"BIABDUCTION_MEMORY_LEAK" ~hum:"Memory Leak" Error
- Biabduction
-
+ register ~enabled:false ~id:"BIABDUCTION_MEMORY_LEAK" ~hum:"Memory Leak" Error Biabduction
+ ~user_documentation:"See [MEMORY_LEAK](#memory_leak)."
-let missing_fld =
- register_from_string ~visibility:Developer ~id:"Missing_fld" ~hum:"Missing Field" Error
- Biabduction
+let missing_fld = register_hidden ~id:"Missing_fld" ~hum:"Missing Field" Error Biabduction
let missing_required_prop =
- register_from_string ~id:"MISSING_REQUIRED_PROP" ~hum:"Missing Required Prop" Error
- LithoRequiredProps ~user_documentation:"As explained by the analysis."
+ register ~id:"MISSING_REQUIRED_PROP" ~hum:"Missing Required Prop" Error LithoRequiredProps
+ ~user_documentation:"As explained by the analysis."
let mixed_self_weakself =
- register_from_string ~id:"MIXED_SELF_WEAKSELF" ~hum:"Mixed Self WeakSelf" Error SelfInBlock
+ register ~id:"MIXED_SELF_WEAKSELF" ~hum:"Mixed Self WeakSelf" Error SelfInBlock
~user_documentation:[%blob "../../documentation/issues/MIXED_SELF_WEAKSELF.md"]
let multiple_weakself =
- register_from_string ~id:"MULTIPLE_WEAKSELF" ~hum:"Multiple WeakSelf Use" Error SelfInBlock
+ register ~id:"MULTIPLE_WEAKSELF" ~hum:"Multiple WeakSelf Use" Error SelfInBlock
~user_documentation:[%blob "../../documentation/issues/MULTIPLE_WEAKSELF.md"]
let mutable_local_variable_in_component_file =
- register_from_string ~id:"MUTABLE_LOCAL_VARIABLE_IN_COMPONENT_FILE" Advice Linters
+ register ~id:"MUTABLE_LOCAL_VARIABLE_IN_COMPONENT_FILE" Advice Linters
~user_documentation:
[%blob "../../documentation/issues/MUTABLE_LOCAL_VARIABLE_IN_COMPONENT_FILE.md"]
let null_dereference =
- register_from_string ~id:"NULL_DEREFERENCE" Error Biabduction
+ register ~id:"NULL_DEREFERENCE" Error Biabduction
~user_documentation:[%blob "../../documentation/issues/NULL_DEREFERENCE.md"]
let nullptr_dereference =
- register_from_string ~enabled:false ~id:"NULLPTR_DEREFERENCE" Error Pulse
+ register ~enabled:false ~id:"NULLPTR_DEREFERENCE" Error Pulse
~user_documentation:"See [NULL_DEREFERENCE](#null_dereference)."
let parameter_not_null_checked =
- register_from_string ~id:"PARAMETER_NOT_NULL_CHECKED" Warning Biabduction
+ register ~id:"PARAMETER_NOT_NULL_CHECKED" Warning Biabduction
~user_documentation:[%blob "../../documentation/issues/PARAMETER_NOT_NULL_CHECKED.md"]
-let pointer_size_mismatch = register_from_string ~id:"POINTER_SIZE_MISMATCH" Error Biabduction
+let pointer_size_mismatch =
+ register ~id:"POINTER_SIZE_MISMATCH" Error Biabduction (* TODO *) ~user_documentation:""
+
let _pointer_to_const_objc_class =
- register_from_string ~id:"POINTER_TO_CONST_OBJC_CLASS" Warning Linters
+ register ~id:"POINTER_TO_CONST_OBJC_CLASS" Warning Linters
~user_documentation:[%blob "../../documentation/issues/POINTER_TO_CONST_OBJC_CLASS.md"]
-let precondition_not_found =
- register_from_string ~visibility:Developer ~id:"PRECONDITION_NOT_FOUND" Error Biabduction
-
-
-let precondition_not_met =
- register_from_string ~visibility:Developer ~id:"PRECONDITION_NOT_MET" Warning Biabduction
+let precondition_not_found = register_hidden ~id:"PRECONDITION_NOT_FOUND" Error Biabduction
+let precondition_not_met = register_hidden ~id:"PRECONDITION_NOT_MET" Warning Biabduction
let premature_nil_termination =
- register_from_string ~id:"PREMATURE_NIL_TERMINATION_ARGUMENT" Warning Biabduction
+ register ~id:"PREMATURE_NIL_TERMINATION_ARGUMENT" Warning Biabduction
~user_documentation:[%blob "../../documentation/issues/PREMATURE_NIL_TERMINATION_ARGUMENT.md"]
let pulse_memory_leak =
- register_from_string ~id:"MEMORY_LEAK" Error Pulse
+ register ~id:"MEMORY_LEAK" Error Pulse
~user_documentation:[%blob "../../documentation/issues/MEMORY_LEAK.md"]
let pure_function =
- register_from_string ~id:"PURE_FUNCTION" Error Purity
+ register ~id:"PURE_FUNCTION" Error Purity
~user_documentation:[%blob "../../documentation/issues/PURE_FUNCTION.md"]
let quandary_taint_error =
- register_from_string ~hum:"Taint Error" ~id:"QUANDARY_TAINT_ERROR" Error Quandary
+ register ~hum:"Taint Error" ~id:"QUANDARY_TAINT_ERROR" Error Quandary
~user_documentation:"Generic taint error when nothing else fits."
let _registered_observer_being_deallocated =
- register_from_string ~id:"REGISTERED_OBSERVER_BEING_DEALLOCATED" Warning Linters
+ register ~id:"REGISTERED_OBSERVER_BEING_DEALLOCATED" Warning Linters
~user_documentation:
[%blob "../../documentation/issues/REGISTERED_OBSERVER_BEING_DEALLOCATED.md"]
let resource_leak =
- register_from_string ~id:"RESOURCE_LEAK" Error Biabduction
+ register ~id:"RESOURCE_LEAK" Error Biabduction
~user_documentation:[%blob "../../documentation/issues/RESOURCE_LEAK.md"]
let retain_cycle =
- register_from_string ~enabled:true ~id:"RETAIN_CYCLE" Error Biabduction
+ register ~enabled:true ~id:"RETAIN_CYCLE" Error Biabduction
~user_documentation:[%blob "../../documentation/issues/RETAIN_CYCLE.md"]
-let skip_function =
- register_from_string ~visibility:Developer ~enabled:false ~id:"SKIP_FUNCTION" Info Biabduction
-
+let skip_function = register_hidden ~enabled:false ~id:"SKIP_FUNCTION" Info Biabduction
let skip_pointer_dereference =
- register_from_string ~enabled:false ~id:"SKIP_POINTER_DEREFERENCE" Info Biabduction
+ register ~enabled:false ~id:"SKIP_POINTER_DEREFERENCE" Info Biabduction (* TODO *)
+ ~user_documentation:""
let shell_injection =
- register_from_string ~id:"SHELL_INJECTION" Error Quandary
+ register ~id:"SHELL_INJECTION" Error Quandary
~user_documentation:"Environment variable or file data flowing to shell."
let shell_injection_risk =
- register_from_string ~id:"SHELL_INJECTION_RISK" Error Quandary
+ register ~id:"SHELL_INJECTION_RISK" Error Quandary
~user_documentation:"Code injection if the caller of the endpoint doesn't sanitize on its end."
let sql_injection =
- register_from_string ~id:"SQL_INJECTION" Error Quandary
+ register ~id:"SQL_INJECTION" Error Quandary
~user_documentation:"Untrusted and unescaped data flows to SQL."
let sql_injection_risk =
- register_from_string ~id:"SQL_INJECTION_RISK" Error Quandary
+ register ~id:"SQL_INJECTION_RISK" Error Quandary
~user_documentation:"Untrusted and unescaped data flows to SQL."
let stack_variable_address_escape =
- register_from_string ~id:"STACK_VARIABLE_ADDRESS_ESCAPE" Error Pulse
+ register ~id:"STACK_VARIABLE_ADDRESS_ESCAPE" Error Pulse
~user_documentation:[%blob "../../documentation/issues/STACK_VARIABLE_ADDRESS_ESCAPE.md"]
let starvation =
- register_from_string ~id:"STARVATION" ~hum:"UI Thread Starvation" Error Starvation
+ register ~id:"STARVATION" ~hum:"UI Thread Starvation" Error Starvation
~user_documentation:[%blob "../../documentation/issues/STARVATION.md"]
let static_initialization_order_fiasco =
- register_from_string ~id:"STATIC_INITIALIZATION_ORDER_FIASCO" Error SIOF
+ register ~id:"STATIC_INITIALIZATION_ORDER_FIASCO" Error SIOF
~user_documentation:[%blob "../../documentation/issues/STATIC_INITIALIZATION_ORDER_FIASCO.md"]
let strict_mode_violation =
- register_from_string ~id:"STRICT_MODE_VIOLATION" ~hum:"Strict Mode Violation" Error Starvation
+ register ~id:"STRICT_MODE_VIOLATION" ~hum:"Strict Mode Violation" Error Starvation
~user_documentation:[%blob "../../documentation/issues/STRICT_MODE_VIOLATION.md"]
let _strong_delegate_warning =
- register_from_string ~id:"STRONG_DELEGATE_WARNING" Warning Linters
+ register ~id:"STRONG_DELEGATE_WARNING" Warning Linters
~user_documentation:[%blob "../../documentation/issues/STRONG_DELEGATE_WARNING.md"]
let strong_self_not_checked =
- register_from_string ~id:"STRONG_SELF_NOT_CHECKED" ~hum:"StrongSelf Not Checked" Error SelfInBlock
+ register ~id:"STRONG_SELF_NOT_CHECKED" ~hum:"StrongSelf Not Checked" Error SelfInBlock
~user_documentation:[%blob "../../documentation/issues/STRONG_SELF_NOT_CHECKED.md"]
let symexec_memory_error =
- register_from_string ~visibility:Developer ~id:"Symexec_memory_error"
- ~hum:"Symbolic Execution Memory Error" Error Biabduction
+ register_hidden ~id:"Symexec_memory_error" ~hum:"Symbolic Execution Memory Error" Error
+ Biabduction
let thread_safety_violation =
- register_from_string Warning ~id:"THREAD_SAFETY_VIOLATION" RacerD
+ register Warning ~id:"THREAD_SAFETY_VIOLATION" RacerD
~user_documentation:[%blob "../../documentation/issues/THREAD_SAFETY_VIOLATION.md"]
let complexity_increase ~kind ~is_on_ui_thread =
- register_from_cost_string ~kind ~is_on_ui_thread "%s_COMPLEXITY_INCREASE"
+ register_cost ~kind ~is_on_ui_thread "%s_COMPLEXITY_INCREASE"
-let topl_error = register_from_string ~id:"TOPL_ERROR" Error TOPL
+let topl_error = register ~id:"TOPL_ERROR" Error TOPL ~user_documentation:"Experimental."
let unary_minus_applied_to_unsigned_expression =
- register_from_string ~enabled:false ~id:"UNARY_MINUS_APPLIED_TO_UNSIGNED_EXPRESSION" Warning
- Biabduction
+ register ~enabled:false ~id:"UNARY_MINUS_APPLIED_TO_UNSIGNED_EXPRESSION" Warning
+ Biabduction (* TODO *) ~user_documentation:""
let _unavailable_api_in_supported_ios_sdk =
- register_from_string ~id:"UNAVAILABLE_API_IN_SUPPORTED_IOS_SDK" Warning Linters
+ register ~id:"UNAVAILABLE_API_IN_SUPPORTED_IOS_SDK" Warning Linters
~user_documentation:[%blob "../../documentation/issues/UNAVAILABLE_API_IN_SUPPORTED_IOS_SDK.md"]
let uninitialized_value =
- register_from_string ~id:"UNINITIALIZED_VALUE" Error Uninit
+ register ~id:"UNINITIALIZED_VALUE" Error Uninit
~user_documentation:[%blob "../../documentation/issues/UNINITIALIZED_VALUE.md"]
let unreachable_code_after =
- register_from_string ~id:"UNREACHABLE_CODE" Error BufferOverrunChecker
+ register ~id:"UNREACHABLE_CODE" Error BufferOverrunChecker
~user_documentation:"A program point is unreachable."
let use_after_delete =
- register_from_string ~id:"USE_AFTER_DELETE" Error Pulse
+ register ~id:"USE_AFTER_DELETE" Error Pulse
~user_documentation:[%blob "../../documentation/issues/USE_AFTER_DELETE.md"]
let use_after_free =
- register_from_string ~id:"USE_AFTER_FREE" Error Pulse
+ register ~id:"USE_AFTER_FREE" Error Pulse
~user_documentation:[%blob "../../documentation/issues/USE_AFTER_FREE.md"]
let use_after_lifetime =
- register_from_string ~id:"USE_AFTER_LIFETIME" Error Pulse
+ register ~id:"USE_AFTER_LIFETIME" Error Pulse
~user_documentation:[%blob "../../documentation/issues/USE_AFTER_LIFETIME.md"]
let user_controlled_sql_risk =
- register_from_string ~id:"USER_CONTROLLED_SQL_RISK" Error Quandary
+ register ~id:"USER_CONTROLLED_SQL_RISK" Error Quandary
~user_documentation:"Untrusted data flows to SQL (no injection risk)."
let untrusted_buffer_access =
- register_from_string ~enabled:false ~id:"UNTRUSTED_BUFFER_ACCESS" Error Quandary
+ register ~enabled:false ~id:"UNTRUSTED_BUFFER_ACCESS" Error Quandary
~user_documentation:"Untrusted data of any kind flowing to buffer."
let untrusted_deserialization =
- register_from_string ~id:"UNTRUSTED_DESERIALIZATION" Error Quandary
+ register ~id:"UNTRUSTED_DESERIALIZATION" Error Quandary
~user_documentation:"User-controlled deserialization."
let untrusted_deserialization_risk =
- register_from_string ~id:"UNTRUSTED_DESERIALIZATION_RISK" Error Quandary
+ register ~id:"UNTRUSTED_DESERIALIZATION_RISK" Error Quandary
~user_documentation:"User-controlled deserialization"
let untrusted_environment_change_risk =
- register_from_string ~id:"UNTRUSTED_ENVIRONMENT_CHANGE_RISK" Error Quandary
+ register ~id:"UNTRUSTED_ENVIRONMENT_CHANGE_RISK" Error Quandary
~user_documentation:"User-controlled environment mutation."
let untrusted_file =
- register_from_string ~id:"UNTRUSTED_FILE" Error Quandary
+ register ~id:"UNTRUSTED_FILE" Error Quandary
~user_documentation:
"User-controlled file creation; may be vulnerable to path traversal and more."
let untrusted_file_risk =
- register_from_string ~id:"UNTRUSTED_FILE_RISK" Error Quandary
+ register ~id:"UNTRUSTED_FILE_RISK" Error Quandary
~user_documentation:
"User-controlled file creation; may be vulnerable to path traversal and more."
let untrusted_heap_allocation =
- register_from_string ~enabled:false ~id:"UNTRUSTED_HEAP_ALLOCATION" Error Quandary
+ register ~enabled:false ~id:"UNTRUSTED_HEAP_ALLOCATION" Error Quandary
~user_documentation:
"Untrusted data of any kind flowing to heap allocation. this can cause crashes or DOS."
let untrusted_intent_creation =
- register_from_string ~id:"UNTRUSTED_INTENT_CREATION" Error Quandary
+ register ~id:"UNTRUSTED_INTENT_CREATION" Error Quandary
~user_documentation:"Creating an Intent from user-controlled data."
let untrusted_url_risk =
- register_from_string ~id:"UNTRUSTED_URL_RISK" Error Quandary
+ register ~id:"UNTRUSTED_URL_RISK" Error Quandary
~user_documentation:"Untrusted flag, environment variable, or file data flowing to URL."
let untrusted_variable_length_array =
- register_from_string ~id:"UNTRUSTED_VARIABLE_LENGTH_ARRAY" Error Quandary
+ register ~id:"UNTRUSTED_VARIABLE_LENGTH_ARRAY" Error Quandary
~user_documentation:
"Untrusted data of any kind flowing to stack buffer allocation. Trying to allocate a stack \
buffer that's too large will cause a stack overflow."
-let vector_invalidation = register_from_string ~id:"VECTOR_INVALIDATION" Error Pulse
+let vector_invalidation =
+ register ~id:"VECTOR_INVALIDATION" Error Pulse
+ ~user_documentation:[%blob "../../documentation/issues/VECTOR_INVALIDATION.md"]
+
let weak_self_in_noescape_block =
- register_from_string ~id:"WEAK_SELF_IN_NO_ESCAPE_BLOCK" Error SelfInBlock
+ register ~id:"WEAK_SELF_IN_NO_ESCAPE_BLOCK" Error SelfInBlock
~user_documentation:[%blob "../../documentation/issues/WEAK_SELF_IN_NO_ESCAPE_BLOCK.md"]
let wrong_argument_number =
- register_from_string ~visibility:Developer ~id:"Wrong_argument_number"
- ~hum:"Wrong Argument Number" Error Biabduction
-
+ register_hidden ~id:"Wrong_argument_number" ~hum:"Wrong Argument Number" Error Biabduction
-let unreachable_cost_call ~kind =
- register_from_cost_string ~enabled:false ~kind "%s_UNREACHABLE_AT_EXIT"
+let unreachable_cost_call ~kind = register_cost ~enabled:false ~kind "%s_UNREACHABLE_AT_EXIT"
(* register enabled cost issues *)
let () =
diff --git a/infer/src/base/IssueType.mli b/infer/src/base/IssueType.mli
index 58ca34c75..3f9f362df 100644
--- a/infer/src/base/IssueType.mli
+++ b/infer/src/base/IssueType.mli
@@ -45,14 +45,12 @@ val pp : Format.formatter -> t -> unit
val find_from_string : id:string -> t option
(** return the issue type if it was previously registered *)
-val register_from_string :
+val register_dynamic :
?enabled:bool
- -> ?is_cost_issue:bool
-> ?hum:string
-> ?doc_url:string
- -> ?linters_def_file:string
+ -> linters_def_file:string option
-> id:string
- -> ?visibility:visibility
-> ?user_documentation:string
-> severity
-> Checker.t
diff --git a/infer/src/biabduction/Exceptions.ml b/infer/src/biabduction/Exceptions.ml
index 4baeff8bf..ae8ba1573 100644
--- a/infer/src/biabduction/Exceptions.ml
+++ b/infer/src/biabduction/Exceptions.ml
@@ -111,7 +111,8 @@ let recognize_exception exn : IssueToReport.t =
| Class_cast_exception (desc, ocaml_pos) ->
{issue_type= IssueType.class_cast_exception; description= desc; ocaml_pos= Some ocaml_pos}
| Custom_error (error_msg, severity, desc) ->
- { issue_type= IssueType.register_from_string ~id:error_msg severity Biabduction
+ { issue_type=
+ IssueType.register_dynamic ~linters_def_file:None ~id:error_msg severity Biabduction
; description= desc
; ocaml_pos= None }
| Dangling_pointer_dereference (user_visible, desc, ocaml_pos) ->
diff --git a/infer/src/checkers/annotationReachability.ml b/infer/src/checkers/annotationReachability.ml
index c7df6abb6..76024da75 100644
--- a/infer/src/checkers/annotationReachability.ml
+++ b/infer/src/checkers/annotationReachability.ml
@@ -331,8 +331,8 @@ module CxxAnnotationSpecs = struct
(List.Assoc.find ~equal:String.equal spec_cfg "doc_url")
in
let linters_def_file = Option.value_map ~default:"" ~f:Fn.id Config.inferconfig_file in
- IssueType.register_from_string ~id:spec_name ~doc_url ~linters_def_file Error
- AnnotationReachability
+ IssueType.register_dynamic ~id:spec_name ~doc_url ~linters_def_file:(Some linters_def_file)
+ Error AnnotationReachability
in
Reporting.log_issue proc_desc err_log ~loc ~ltr:final_trace AnnotationReachability issue_type
description
diff --git a/infer/src/integration/Help.ml b/infer/src/integration/Help.ml
index ccc267ad3..65abcca46 100644
--- a/infer/src/integration/Help.ml
+++ b/infer/src/integration/Help.ml
@@ -98,13 +98,11 @@ let all_issues_header =
title: List of all issue types
---
-Here is an overview of the issue types currently reported by Infer. Currently outdated and being worked on!
+Here is an overview of the issue types currently reported by Infer.
|}
-(* TODO: instead of just taking issues that have documentation, enforce that (some, eg enabled
- by default) issue types always have documentation *)
let all_issues =
lazy
( IssueType.all_issues ()
diff --git a/website/checkers.json b/website/checkers.json
index 77fb93fff..ba438aa1c 100644
--- a/website/checkers.json
+++ b/website/checkers.json
@@ -3,14 +3,15 @@
"This is a @generated file, run `make doc-publish` from the root of the infer repository to generate it",
"doc_entries": [
"all-issue-types", "checker-annotation-reachability",
- "checker-biabduction", "checker-bufferoverrun", "checker-cost",
+ "checker-biabduction", "checker-bufferoverrun",
+ "checker-config-checks-between-markers", "checker-cost",
"checker-eradicate", "checker-fragment-retains-view",
"checker-immutable-cast", "checker-impurity",
"checker-inefficient-keyset-iterator", "checker-linters",
"checker-litho-required-props", "checker-liveness",
"checker-loop-hoisting", "checker-printf-args", "checker-pulse",
- "checker-purity", "checker-quandary", "checker-racerd", "checker-siof",
- "checker-self-in-block", "checker-starvation", "checker-topl",
- "checker-uninit"
+ "checker-purity", "checker-quandary", "checker-racerd",
+ "checker-resource-leak-lab", "checker-siof", "checker-self-in-block",
+ "checker-starvation", "checker-topl", "checker-uninit"
]
}
\ No newline at end of file
diff --git a/website/docs/all-issue-types.md b/website/docs/all-issue-types.md
index 932beff09..a28011b9c 100644
--- a/website/docs/all-issue-types.md
+++ b/website/docs/all-issue-types.md
@@ -2,7 +2,7 @@
title: List of all issue types
---
-Here is an overview of the issue types currently reported by Infer. Currently outdated and being worked on!
+Here is an overview of the issue types currently reported by Infer.
## ASSIGN_POINTER_WARNING
@@ -33,6 +33,11 @@ integer pointed to by `n` is nonzero (e.g., she may have meant to call an
accessor like `[n intValue]` instead). Infer will ask the programmer explicitly
compare `n` to `nil` or call an accessor to clarify her intention.
+## BIABDUCTION_MEMORY_LEAK
+
+Reported as "Memory Leak" by [biabduction](/docs/next/checker-biabduction).
+
+See [MEMORY_LEAK](#memory_leak).
## BUFFER_OVERRUN_L1
Reported as "Buffer Overrun L1" by [bufferoverrun](/docs/next/checker-bufferoverrun).
@@ -55,30 +60,9 @@ report. The higher the number, the more likely it is to be a false positive.
* `L3`: The reports that are not included in the above cases.
-Other than them, there are some specific-purpose buffer overrun reports as follows.
-
-* `R2`: An array access is unsafe by *risky* array values from `strndup`. For example, suppose
- there is a `strndup` call as follows.
-
- ```c
- char* s1 = (char*)malloc(sizeof(char) * size);
- for (int i = 0; i < size; i++) {
- s1[i] = 'a';
- }
- s1[5] = '\0';
- char* s2 = strndup(s1, size - 1);
- s2[size - 1] = 'a';
- ```
-
- Even if the second parameter of `strndup` is `size - 1`, the length of `s2` can be shorter than
- `size` if there is the null character in the middle of `s1`.
-
* `S2`: An array access is unsafe by symbolic values. For example, array size: `[n,n]`, offset
`[n,+oo]`.
-* `T1`: An array access is unsafe by tainted external values. This is experimental and will be
- removed sooner or later.
-
* `U5`: An array access is unsafe by unknown values, which are usually from unknown function
calls.
@@ -101,21 +85,11 @@ See [BUFFER_OVERRUN_L1](#buffer_overrun_l1)
Reported as "Buffer Overrun L5" by [bufferoverrun](/docs/next/checker-bufferoverrun).
-See [BUFFER_OVERRUN_L1](#buffer_overrun_l1)
-## BUFFER_OVERRUN_R2
-
-Reported as "Buffer Overrun R2" by [bufferoverrun](/docs/next/checker-bufferoverrun).
-
See [BUFFER_OVERRUN_L1](#buffer_overrun_l1)
## BUFFER_OVERRUN_S2
Reported as "Buffer Overrun S2" by [bufferoverrun](/docs/next/checker-bufferoverrun).
-See [BUFFER_OVERRUN_L1](#buffer_overrun_l1)
-## BUFFER_OVERRUN_T1
-
-Reported as "Buffer Overrun T1" by [bufferoverrun](/docs/next/checker-bufferoverrun).
-
See [BUFFER_OVERRUN_L1](#buffer_overrun_l1)
## BUFFER_OVERRUN_U5
@@ -250,6 +224,16 @@ Action: fix the mismatch between format string and argument types.
Reported as "Component Factory Function" by [linters](/docs/next/checker-linters).
+## COMPONENT_FILE_CYCLOMATIC_COMPLEXITY
+
+Reported as "Component File Cyclomatic Complexity" by [linters](/docs/next/checker-linters).
+
+
+## COMPONENT_FILE_LINE_COUNT
+
+Reported as "Component File Line Count" by [linters](/docs/next/checker-linters).
+
+
## COMPONENT_INITIALIZER_WITH_SIDE_EFFECTS
Reported as "Component Initializer With Side Effects" by [linters](/docs/next/checker-linters).
@@ -276,6 +260,11 @@ A condition expression is **always** evaluated to false.
Reported as "Condition Always True" by [bufferoverrun](/docs/next/checker-bufferoverrun).
A condition expression is **always** evaluated to true.
+## CONFIG_CHECKS_BETWEEN_MARKERS
+
+Reported as "Config Checks Between Markers" by [config-checks-between-markers](/docs/next/checker-config-checks-between-markers).
+
+A config checking is done between a marker's start and end
## CONSTANT_ADDRESS_DEREFERENCE
Reported as "Constant Address Dereference" by [pulse](/docs/next/checker-pulse).
@@ -316,6 +305,11 @@ const int copied_v = v;
};
```
+## DANGLING_POINTER_DEREFERENCE
+
+Reported as "Dangling Pointer Dereference" by [biabduction](/docs/next/checker-biabduction).
+
+
## DEADLOCK
Reported as "Deadlock" by [starvation](/docs/next/checker-starvation).
@@ -467,6 +461,11 @@ I work for (null)
Note that the custom setter was only invoked once.
+## DIVIDE_BY_ZERO
+
+Reported as "Divide By Zero" by [biabduction](/docs/next/checker-biabduction).
+
+
## EMPTY_VECTOR_ACCESS
Reported as "Empty Vector Access" by [biabduction](/docs/next/checker-biabduction).
@@ -484,6 +483,11 @@ int foo(){
}
```
+## ERADICATE_BAD_NESTED_CLASS_ANNOTATION
+
+Reported as "@Nullsafe annotation is inconsistent with outer class" by [eradicate](/docs/next/checker-eradicate).
+
+
## ERADICATE_CONDITION_REDUNDANT
Reported as "Condition Redundant" by [eradicate](/docs/next/checker-eradicate).
@@ -558,6 +562,11 @@ add a @Nullable annotation to the field. This annotation might trigger more
warnings in other code that uses the field, as that code must now deal with null
values.
+## ERADICATE_FIELD_OVER_ANNOTATED
+
+Reported as "Field Over Annotated" by [eradicate](/docs/next/checker-eradicate).
+
+
## ERADICATE_INCONSISTENT_SUBCLASS_PARAMETER_ANNOTATION
Reported as "Inconsistent Subclass Parameter Annotation" by [eradicate](/docs/next/checker-eradicate).
@@ -647,6 +656,29 @@ class Main {
}
```
+## ERADICATE_META_CLASS_CAN_BE_NULLSAFE
+
+Reported as "Class has 0 issues and can be marked @Nullsafe" by [eradicate](/docs/next/checker-eradicate).
+
+
+## ERADICATE_META_CLASS_IS_NULLSAFE
+
+Reported as "Class is marked @Nullsafe and has 0 issues" by [eradicate](/docs/next/checker-eradicate).
+
+
+## ERADICATE_META_CLASS_NEEDS_IMPROVEMENT
+
+Reported as "Class needs improvement to become @Nullsafe" by [eradicate](/docs/next/checker-eradicate).
+
+Reported when the class either:
+- has at least one nullability issue, or
+- has at least one (currently possibly hidden) issue preventing it from being marked `@Nullsafe`.
+
+## ERADICATE_NULLABLE_DEREFERENCE
+
+Reported as "Nullable Dereference" by [eradicate](/docs/next/checker-eradicate).
+
+
## ERADICATE_PARAMETER_NOT_NULLABLE
Reported as "Parameter Not Nullable" by [eradicate](/docs/next/checker-eradicate).
@@ -674,6 +706,11 @@ done, add a @Nullable annotation to the relevant parameter in the method
declaration. This annotation might trigger more warnings in the implementation
of method m, as that code must now deal with null values.
+## ERADICATE_REDUNDANT_NESTED_CLASS_ANNOTATION
+
+Reported as "@Nullsafe annotation is redundant" by [eradicate](/docs/next/checker-eradicate).
+
+
## ERADICATE_RETURN_NOT_NULLABLE
Reported as "Return Not Nullable" by [eradicate](/docs/next/checker-eradicate).
@@ -722,6 +759,16 @@ the annotations of any method called directly by the current method, if
relevant. If the annotations are correct, you can remove the @Nullable
annotation.
+## ERADICATE_UNCHECKED_USAGE_IN_NULLSAFE
+
+Reported as "Nullsafe mode: unchecked usage of a value" by [eradicate](/docs/next/checker-eradicate).
+
+
+## ERADICATE_UNVETTED_THIRD_PARTY_IN_NULLSAFE
+
+Reported as "Nullsafe mode: unchecked usage of unvetted third-party" by [eradicate](/docs/next/checker-eradicate).
+
+
## EXECUTION_TIME_COMPLEXITY_INCREASE
Reported as "Execution Time Complexity Increase" by [cost](/docs/next/checker-cost).
@@ -904,11 +951,6 @@ Reported as "Inferbo Alloc May Be Big" by [bufferoverrun](/docs/next/checker-buf
Reported as "Inferbo Alloc May Be Negative" by [bufferoverrun](/docs/next/checker-bufferoverrun).
`malloc` *may* be called with a negative value.
-## INFERBO_ALLOC_MAY_BE_TAINTED
-
-Reported as "Inferbo Alloc May Be Tainted" by [bufferoverrun](/docs/next/checker-bufferoverrun).
-
-`malloc` *may* be called with a tainted value from external sources. This is experimental and will be removed sooner or later.
## INFINITE_EXECUTION_TIME
Reported as "Infinite Execution Time" by [cost](/docs/next/checker-cost).
@@ -954,10 +996,6 @@ report. The higher the number, the more likely it is to be a false positive.
* `L5`: The reports that are not included in the above cases.
-Other than them, there as some specific-purpose buffer overrun reports as follows.
-
-* `R2`: A binary integer operation is unsafe by *risky* return values from `strndup`.
-
* `U5`: A binary integer operation is unsafe by unknown values, which are usually from unknown
function calls.
@@ -970,11 +1008,6 @@ See [INTEGER_OVERFLOW_L1](#integer_overflow_l1)
Reported as "Integer Overflow L5" by [bufferoverrun](/docs/next/checker-bufferoverrun).
-See [INTEGER_OVERFLOW_L1](#integer_overflow_l1)
-## INTEGER_OVERFLOW_R2
-
-Reported as "Integer Overflow R2" by [bufferoverrun](/docs/next/checker-bufferoverrun).
-
See [INTEGER_OVERFLOW_L1](#integer_overflow_l1)
## INTEGER_OVERFLOW_U5
@@ -1040,6 +1073,11 @@ is not called with `nil`.
Reported as "Javascript Injection" by [quandary](/docs/next/checker-quandary).
Untrusted data flows into JavaScript.
+## LAB_RESOURCE_LEAK
+
+Reported as "Lab Resource Leak" by [resource-leak-lab](/docs/next/checker-resource-leak-lab).
+
+Toy issue.
## LOCKLESS_VIOLATION
Reported as "Lockless Violation" by [starvation](/docs/next/checker-starvation).
@@ -1288,6 +1326,11 @@ is not called with `nil`. When an argument will never be `nil`, you can add the
annotation `nonnull` to the argument's type, to tell Infer (and the type
system), that the argument won't be `nil`. This will silence the warning.
+## POINTER_SIZE_MISMATCH
+
+Reported as "Pointer Size Mismatch" by [biabduction](/docs/next/checker-biabduction).
+
+
## POINTER_TO_CONST_OBJC_CLASS
Reported as "Pointer To Const Objc Class" by [linters](/docs/next/checker-linters).
@@ -1693,6 +1736,11 @@ Environment variable or file data flowing to shell.
Reported as "Shell Injection Risk" by [quandary](/docs/next/checker-quandary).
Code injection if the caller of the endpoint doesn't sanitize on its end.
+## SKIP_POINTER_DEREFERENCE
+
+Reported as "Skip Pointer Dereference" by [biabduction](/docs/next/checker-biabduction).
+
+
## SQL_INJECTION
Reported as "Sql Injection" by [quandary](/docs/next/checker-quandary).
@@ -1928,6 +1976,16 @@ These annotations can be found at `com.facebook.infer.annotation.*`.
other threads. The main utility of this annotation is in interfaces, where
Infer cannot look up the implementation and decide for itself.
+## TOPL_ERROR
+
+Reported as "Topl Error" by [topl](/docs/next/checker-topl).
+
+Experimental.
+## UNARY_MINUS_APPLIED_TO_UNSIGNED_EXPRESSION
+
+Reported as "Unary Minus Applied To Unsigned Expression" by [biabduction](/docs/next/checker-biabduction).
+
+
## UNAVAILABLE_API_IN_SUPPORTED_IOS_SDK
Reported as "Unavailable Api In Supported Ios Sdk" by [linters](/docs/next/checker-linters).
@@ -2068,6 +2126,29 @@ void foo() {
}
```
+## VECTOR_INVALIDATION
+
+Reported as "Vector Invalidation" by [pulse](/docs/next/checker-pulse).
+
+An address pointing into a C++ `std::vector` might have become
+invalid. This can happen when an address is taken into a vector, then
+the vector is mutated in a way that might invalidate the address, for
+example by adding elements to the vector, which might trigger a
+re-allocation of the entire vector contents (thereby invalidating the
+pointers into the previous location of the contents).
+
+For example:
+
+```C++
+void deref_vector_element_after_push_back_bad(std::vector
Limit of field depth of abstract location in buffer-overrun checker
- ---bo-service-handler-request
- -Activates: [EXPERIMENTAL] Use -taint flow of service handler requests in buffer overflow -checking. (Conversely: ---no-bo-service-handler-request)
-Limit of field depth of abstract location in buffer-overrun checker
-See also
-infer-analyze(1).
---bo-service-handler-request
Activates: [EXPERIMENTAL] Use -taint flow of service handler requests in buffer overflow -checking. (Conversely: ---no-bo-service-handler-request)
-See also
infer-analyze(1).
--bootclasspath string
Absint.FbPatternMatch
val is_subtype_of_fb_service_handler : IR.Tenv.t -> IR.Typ.Name.t -> bool
Absint
module AbstractDomain : sig ... end
module AbstractInterpreter : sig ... end
module AccessPath : sig ... end
module AccessTree : sig ... end
module AnalysisCallbacks : sig ... end
module AnalysisState : sig ... end
module AndroidFramework : sig ... end
module Annotations : sig ... end
module Bindings : sig ... end
module CallSite : sig ... end
module ConcurrencyModels : sig ... end
module DataFlow : sig ... end
module Decompile : sig ... end
module Errlog : sig ... end
module Exe_env : sig ... end
module ExplicitTrace : sig ... end
module FbPatternMatch : sig ... end
module FormalMap : sig ... end
module HilExp : sig ... end
module HilInstr : sig ... end
module IdAccessPathMapDomain : sig ... end
module InterproceduralAnalysis : sig ... end
module IntraproceduralAnalysis : sig ... end
module IssueLog : sig ... end
module IssueToReport : sig ... end
module Localise : sig ... end
module LowerHil : sig ... end
module MethodMatcher : sig ... end
module Mleak_buckets : sig ... end
module NoReturnModels : sig ... end
module Passthrough : sig ... end
module PatternMatch : sig ... end
module ProcCfg : sig ... end
module ProcnameDispatcher : sig ... end
module Reporting : sig ... end
module Sanitizer : sig ... end
module Scheduler : sig ... end
module Sink : sig ... end
module SinkTrace : sig ... end
module Source : sig ... end
module SubtypingCheck : sig ... end
module TaintTrace : sig ... end
module TaintTraceElem : sig ... end
module TaskSchedulerTypes : sig ... end
module TransferFunctions : sig ... end
Absint
module AbstractDomain : sig ... end
module AbstractInterpreter : sig ... end
module AccessPath : sig ... end
module AccessTree : sig ... end
module AnalysisCallbacks : sig ... end
module AnalysisState : sig ... end
module AndroidFramework : sig ... end
module Annotations : sig ... end
module Bindings : sig ... end
module CallSite : sig ... end
module ConcurrencyModels : sig ... end
module DataFlow : sig ... end
module Decompile : sig ... end
module Errlog : sig ... end
module Exe_env : sig ... end
module ExplicitTrace : sig ... end
module FormalMap : sig ... end
module HilExp : sig ... end
module HilInstr : sig ... end
module IdAccessPathMapDomain : sig ... end
module InterproceduralAnalysis : sig ... end
module IntraproceduralAnalysis : sig ... end
module IssueLog : sig ... end
module IssueToReport : sig ... end
module Localise : sig ... end
module LowerHil : sig ... end
module MethodMatcher : sig ... end
module Mleak_buckets : sig ... end
module NoReturnModels : sig ... end
module Passthrough : sig ... end
module PatternMatch : sig ... end
module ProcCfg : sig ... end
module ProcnameDispatcher : sig ... end
module Reporting : sig ... end
module Sanitizer : sig ... end
module Scheduler : sig ... end
module Sink : sig ... end
module SinkTrace : sig ... end
module Source : sig ... end
module SubtypingCheck : sig ... end
module TaintTrace : sig ... end
module TaintTraceElem : sig ... end
module TaskSchedulerTypes : sig ... end
module TransferFunctions : sig ... end
Absint__FbPatternMatch
val is_subtype_of_fb_service_handler : IR.Tenv.t -> IR.Typ.Name.t -> bool
BufferOverrunDomain.Taint
include Absint.AbstractDomain.WithBottom
include Absint.AbstractDomain.S
include Absint.AbstractDomain.NoJoin
include IStdlib.PrettyPrintable.PrintableType
val pp : IStdlib.PrettyPrintable.F.formatter -> t -> unit
val bottom : t
The bottom value of the domain.
val is_bottom : t -> bool
Return true if this is the bottom value
val compare : t -> t -> int
val pp : Stdlib.Format.formatter -> t -> unit
val is_tainted : t -> bool
val param_of_path : Symb.SymbolPath.partial -> t
val tainted_of_path : Symb.SymbolPath.partial -> t
type eval_taint
= Symb.SymbolPath.partial -> t
val subst : t -> eval_taint -> t
BufferOverrunDomain.Val
type t
=
{
itv : Itv.t; | Interval |
itv_thresholds : ItvThresholds.t; | |
itv_updated_by : ItvUpdatedBy.t; | |
modeled_range : ModeledRange.t; | |
taint : Taint.t; | |
powloc : AbsLoc.PowLoc.t; | Simple pointers |
arrayblk : ArrayBlk.t; | Array blocks |
traces : BufferOverrunTrace.Set.t; |
}
include Absint.AbstractDomain.S with type t := t
include Absint.AbstractDomain.NoJoin
include IStdlib.PrettyPrintable.PrintableType
val pp : IStdlib.PrettyPrintable.F.formatter -> t -> unit
val bot : t
val of_big_int : ItvThresholds.elt -> t
val of_c_array_alloc : AbsLoc.Allocsite.t -> stride:int option -> offset:Itv.t -> size:Itv.t -> traces:BufferOverrunTrace.Set.t -> t
Construct C array allocation. stride
is a byte size of cell, offset
is initial offset of pointer which is usually zero, and size
is a total number of cells.
val of_java_array_alloc : AbsLoc.Allocsite.t -> length:Itv.t -> traces:BufferOverrunTrace.Set.t -> t
Construct Java array allocation. size
is a total number of cells
val of_int : int -> t
val of_int_lit : IR.IntLit.t -> t
val of_itv : ?traces:BufferOverrunTrace.Set.t -> ?taint:Taint.t -> Itv.t -> t
val of_literal_string : IR.Typ.IntegerWidths.t -> string -> t
val of_loc : ?traces:BufferOverrunTrace.Set.t -> AbsLoc.Loc.t -> t
val of_pow_loc : traces:BufferOverrunTrace.Set.t -> AbsLoc.PowLoc.t -> t
val unknown_locs : t
val unknown_from : IR.Typ.t -> callee_pname:IR.Procname.t option -> location:IBase.Location.t -> t
Unknown return value of callee_pname
val is_bot : t -> bool
Check if the value is bottom
val is_mone : t -> bool
Check if the value is [-1,-1]
val get_all_locs : t -> AbsLoc.PowLoc.t
Get all locations, including pointers and array blocks
val get_array_locs : t -> AbsLoc.PowLoc.t
Get locations of array blocks
val get_array_blk : t -> ArrayBlk.t
val get_range_of_iterator : t -> t
Get a range of an iterator value, for example, if iterator value is [lb,ub]
, it returns [0,ub]
.
val get_itv : t -> Itv.t
val get_modeled_range : t -> ModeledRange.t
val get_pow_loc : t -> AbsLoc.PowLoc.t
val get_taint : t -> Taint.t
val get_traces : t -> BufferOverrunTrace.Set.t
val set_array_length : IBase.Location.t -> length:t -> t -> t
val set_array_offset : IBase.Location.t -> Itv.t -> t -> t
val set_array_stride : Z.t -> t -> t
val set_itv_updated_by_addition : t -> t
val set_itv_updated_by_multiplication : t -> t
val set_itv_updated_by_unknown : t -> t
val set_modeled_range : ModeledRange.t -> t -> t
val (lnot) : t -> t
val neg : t -> t
val plus_a : ?f_trace:(BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t) -> t -> t -> t
Semantics of Binop.PlusA
. f_trace
merges traces of the operands. If f_trace
is not given, it uses a default heuristic merge function.
val plus_pi : t -> t -> t
val minus_a : ?f_trace:(BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t) -> t -> t -> t
val minus_pi : t -> t -> t
val minus_pp : t -> t -> t
val mult : ?f_trace:(BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t) -> t -> t -> t
val div : ?f_trace:(BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t) -> t -> t -> t
val mod_sem : ?f_trace:(BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t) -> t -> t -> t
val shiftlt : ?f_trace:(BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t) -> t -> t -> t
val shiftrt : ?f_trace:(BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t) -> t -> t -> t
val lt_sem : t -> t -> t
val gt_sem : t -> t -> t
val le_sem : t -> t -> t
val ge_sem : t -> t -> t
val eq_sem : t -> t -> t
val ne_sem : t -> t -> t
val band_sem : ?f_trace:(BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t) -> t -> t -> t
val land_sem : t -> t -> t
val lor_sem : t -> t -> t
val unknown_bit : t -> t
Semantic function for some bit operators which are hard to express in the domain, e.g., Unop.BNot
.
val prune_eq : t -> t -> t
Pruning semantics for Binop.Eq
. This prunes value of x
when given x == y
, i.e., prune_eq x y
.
val prune_ne : t -> t -> t
Pruning semantics for Binop.Ne
. This prunes value of x
when given x != y
, i.e., prune_ne x y
.
val prune_lt : t -> t -> t
Pruning semantics for Binop.Lt
. This prunes value of x
when given x < y
, i.e., prune_lt x y
.
val prune_binop : IR.Binop.t -> t -> t -> t
Prune value of x
when given x bop y
, i.e., prune_binop bop x y
val add_assign_trace_elem : IBase.Location.t -> AbsLoc.PowLoc.t -> t -> t
Add assign trace for given abstract locations
val cast : IR.Typ.t -> t -> t
Semantics of cast. This updates type information in pointer values, rather than re-calculating sizes of array blocks.
val subst : t -> eval_sym_trace -> IBase.Location.t -> t
Substitution of symbols in the value
val transform_array_length : IBase.Location.t -> f:(Itv.t -> Itv.t) -> t -> t
Apply f
on array lengths in the value
module Itv : sig ... end
BufferOverrunDomain.Val
type t
=
{
itv : Itv.t; | Interval |
itv_thresholds : ItvThresholds.t; | |
itv_updated_by : ItvUpdatedBy.t; | |
modeled_range : ModeledRange.t; | |
powloc : AbsLoc.PowLoc.t; | Simple pointers |
arrayblk : ArrayBlk.t; | Array blocks |
traces : BufferOverrunTrace.Set.t; |
}
include Absint.AbstractDomain.S with type t := t
include Absint.AbstractDomain.NoJoin
include IStdlib.PrettyPrintable.PrintableType
val pp : IStdlib.PrettyPrintable.F.formatter -> t -> unit
val bot : t
val of_big_int : ItvThresholds.elt -> t
val of_c_array_alloc : AbsLoc.Allocsite.t -> stride:int option -> offset:Itv.t -> size:Itv.t -> traces:BufferOverrunTrace.Set.t -> t
Construct C array allocation. stride
is a byte size of cell, offset
is initial offset of pointer which is usually zero, and size
is a total number of cells.
val of_java_array_alloc : AbsLoc.Allocsite.t -> length:Itv.t -> traces:BufferOverrunTrace.Set.t -> t
Construct Java array allocation. size
is a total number of cells
val of_int : int -> t
val of_int_lit : IR.IntLit.t -> t
val of_itv : ?traces:BufferOverrunTrace.Set.t -> Itv.t -> t
val of_literal_string : IR.Typ.IntegerWidths.t -> string -> t
val of_loc : ?traces:BufferOverrunTrace.Set.t -> AbsLoc.Loc.t -> t
val of_pow_loc : traces:BufferOverrunTrace.Set.t -> AbsLoc.PowLoc.t -> t
val unknown_locs : t
val unknown_from : IR.Typ.t -> callee_pname:IR.Procname.t option -> location:IBase.Location.t -> t
Unknown return value of callee_pname
val is_bot : t -> bool
Check if the value is bottom
val is_mone : t -> bool
Check if the value is [-1,-1]
val get_all_locs : t -> AbsLoc.PowLoc.t
Get all locations, including pointers and array blocks
val get_array_locs : t -> AbsLoc.PowLoc.t
Get locations of array blocks
val get_array_blk : t -> ArrayBlk.t
val get_range_of_iterator : t -> t
Get a range of an iterator value, for example, if iterator value is [lb,ub]
, it returns [0,ub]
.
val get_itv : t -> Itv.t
val get_modeled_range : t -> ModeledRange.t
val get_pow_loc : t -> AbsLoc.PowLoc.t
val get_traces : t -> BufferOverrunTrace.Set.t
val set_array_length : IBase.Location.t -> length:t -> t -> t
val set_array_offset : IBase.Location.t -> Itv.t -> t -> t
val set_array_stride : Z.t -> t -> t
val set_itv_updated_by_addition : t -> t
val set_itv_updated_by_multiplication : t -> t
val set_itv_updated_by_unknown : t -> t
val set_modeled_range : ModeledRange.t -> t -> t
val (lnot) : t -> t
val neg : t -> t
val plus_a : ?f_trace:(BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t) -> t -> t -> t
Semantics of Binop.PlusA
. f_trace
merges traces of the operands. If f_trace
is not given, it uses a default heuristic merge function.
val plus_pi : t -> t -> t
val minus_a : ?f_trace:(BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t) -> t -> t -> t
val minus_pi : t -> t -> t
val minus_pp : t -> t -> t
val mult : ?f_trace:(BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t) -> t -> t -> t
val div : ?f_trace:(BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t) -> t -> t -> t
val mod_sem : ?f_trace:(BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t) -> t -> t -> t
val shiftlt : ?f_trace:(BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t) -> t -> t -> t
val shiftrt : ?f_trace:(BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t) -> t -> t -> t
val lt_sem : t -> t -> t
val gt_sem : t -> t -> t
val le_sem : t -> t -> t
val ge_sem : t -> t -> t
val eq_sem : t -> t -> t
val ne_sem : t -> t -> t
val band_sem : ?f_trace:(BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t -> BufferOverrunTrace.Set.t) -> t -> t -> t
val land_sem : t -> t -> t
val lor_sem : t -> t -> t
val unknown_bit : t -> t
Semantic function for some bit operators which are hard to express in the domain, e.g., Unop.BNot
.
val prune_eq : t -> t -> t
Pruning semantics for Binop.Eq
. This prunes value of x
when given x == y
, i.e., prune_eq x y
.
val prune_ne : t -> t -> t
Pruning semantics for Binop.Ne
. This prunes value of x
when given x != y
, i.e., prune_ne x y
.
val prune_lt : t -> t -> t
Pruning semantics for Binop.Lt
. This prunes value of x
when given x < y
, i.e., prune_lt x y
.
val prune_binop : IR.Binop.t -> t -> t -> t
Prune value of x
when given x bop y
, i.e., prune_binop bop x y
val add_assign_trace_elem : IBase.Location.t -> AbsLoc.PowLoc.t -> t -> t
Add assign trace for given abstract locations
val cast : IR.Typ.t -> t -> t
Semantics of cast. This updates type information in pointer values, rather than re-calculating sizes of array blocks.
val subst : t -> eval_sym_trace -> IBase.Location.t -> t
Substitution of symbols in the value
val transform_array_length : IBase.Location.t -> f:(Itv.t -> Itv.t) -> t -> t
Apply f
on array lengths in the value
module Itv : sig ... end
BO.BufferOverrunDomain
module ItvThresholds : Absint.AbstractDomain.FiniteSetS with type FiniteSetS.elt = Z.t
Set of integers for threshold widening
module ItvUpdatedBy : sig ... end
Domain for recording which operations are used for evaluating interval values
module ModeledRange : sig ... end
ModeledRange
represents how many times the interval value can be updated by modeled functions. This domain is to support the case where there are mismatches between value of a control variable and actual number of loop iterations. For example,
module type TaintS = sig ... end
type eval_sym_trace
=
{
eval_sym : Bounds.Bound.eval_sym; | evaluating symbol |
trace_of_sym : Symb.Symbol.t -> BufferOverrunTrace.Set.t; | getting traces of symbol |
eval_locpath : AbsLoc.PowLoc.eval_locpath; | evaluating path |
eval_taint : Taint.eval_taint; | evaluating taint of path |
}
type for on-demand symbol evaluation in Inferbo
module Val : sig ... end
module KeyRhs : sig ... end
Right hand side of the alias domain. See AliasTarget
.
module AliasTarget : sig ... end
module AliasTargets : sig ... end
module AliasRet : sig ... end
Alias domain for return values of callees
module CoreVal : sig ... end
CoreVal
is similar to Val
, but its compare function is defined only on core parts, interval, pointers, and array blocks, of abstract value. This domain is to keep pruned values, where we do not need to care about the other fields in the abstract values.
module PruningExp : sig ... end
Domain to keep assumed expressions
module PrunedVal : sig ... end
Domain to keep pruned history, which are pairs of a pruned value and an assumed expression
module PrunePairs : sig ... end
PrunePairs
is a map from abstract locations to abstract values that represents pruned results in the latest pruning. It uses InvertedMap
because more pruning means smaller abstract states.
module LatestPrune : sig ... end
Domain to keep latest pruned values
module Reachability : sig ... end
Domain for reachability check
module LoopHeadLoc : sig ... end
module MemReach : sig ... end
Domain for memory of reachable node
module Mem : sig ... end
BO.BufferOverrunDomain
module ItvThresholds : Absint.AbstractDomain.FiniteSetS with type FiniteSetS.elt = Z.t
Set of integers for threshold widening
module ItvUpdatedBy : sig ... end
Domain for recording which operations are used for evaluating interval values
module ModeledRange : sig ... end
ModeledRange
represents how many times the interval value can be updated by modeled functions. This domain is to support the case where there are mismatches between value of a control variable and actual number of loop iterations. For example,
type eval_sym_trace
=
{
eval_sym : Bounds.Bound.eval_sym; | evaluating symbol |
trace_of_sym : Symb.Symbol.t -> BufferOverrunTrace.Set.t; | getting traces of symbol |
eval_locpath : AbsLoc.PowLoc.eval_locpath; | evaluating path |
}
type for on-demand symbol evaluation in Inferbo
module Val : sig ... end
module KeyRhs : sig ... end
Right hand side of the alias domain. See AliasTarget
.
module AliasTarget : sig ... end
module AliasTargets : sig ... end
module AliasRet : sig ... end
Alias domain for return values of callees
module CoreVal : sig ... end
CoreVal
is similar to Val
, but its compare function is defined only on core parts, interval, pointers, and array blocks, of abstract value. This domain is to keep pruned values, where we do not need to care about the other fields in the abstract values.
module PruningExp : sig ... end
Domain to keep assumed expressions
module PrunedVal : sig ... end
Domain to keep pruned history, which are pairs of a pruned value and an assumed expression
module PrunePairs : sig ... end
PrunePairs
is a map from abstract locations to abstract values that represents pruned results in the latest pruning. It uses InvertedMap
because more pruning means smaller abstract states.
module LatestPrune : sig ... end
Domain to keep latest pruned values
module Reachability : sig ... end
Domain for reachability check
module LoopHeadLoc : sig ... end
module MemReach : sig ... end
Domain for memory of reachable node
module Mem : sig ... end
BufferOverrunDomain.TaintS
include Absint.AbstractDomain.WithBottom
include Absint.AbstractDomain.S
include Absint.AbstractDomain.NoJoin
include IStdlib.PrettyPrintable.PrintableType
val pp : IStdlib.PrettyPrintable.F.formatter -> t -> unit
val bottom : t
The bottom value of the domain.
val is_bottom : t -> bool
Return true if this is the bottom value
val compare : t -> t -> int
val pp : Stdlib.Format.formatter -> t -> unit
val is_tainted : t -> bool
val param_of_path : Symb.SymbolPath.partial -> t
val tainted_of_path : Symb.SymbolPath.partial -> t
type eval_taint
= Symb.SymbolPath.partial -> t
val subst : t -> eval_taint -> t
BufferOverrunProofObligations.ConditionSet
val empty : checked_t
val pp : Stdlib.Format.formatter -> checked_t -> unit
val pp_summary : Stdlib.Format.formatter -> summary_t -> unit
val add_array_access : IBase.Location.t -> offset:ItvPure.t -> idx:ItvPure.t -> size:ItvPure.t -> last_included:bool -> taint:BufferOverrunDomain.Taint.t -> idx_traces:BufferOverrunTrace.Set.t -> arr_traces:BufferOverrunTrace.Set.t -> latest_prune:BufferOverrunDomain.LatestPrune.t -> checked_t -> checked_t
val add_alloc_size : IBase.Location.t -> can_be_zero:bool -> length:ItvPure.t -> taint:BufferOverrunDomain.Taint.t -> BufferOverrunTrace.Set.t -> BufferOverrunDomain.LatestPrune.t -> checked_t -> checked_t
val add_binary_operation : IR.Typ.IntegerWidths.t -> IBase.Location.t -> IR.Procname.t -> IR.Binop.t -> lhs:ItvPure.t -> rhs:ItvPure.t -> lhs_traces:BufferOverrunTrace.Set.t -> rhs_traces:BufferOverrunTrace.Set.t -> latest_prune:BufferOverrunDomain.LatestPrune.t -> checked_t -> checked_t
val join : checked_t -> checked_t -> checked_t
val subst : summary_t -> (mode:BufferOverrunSemantics.eval_mode -> BufferOverrunDomain.eval_sym_trace) -> IR.Procname.t -> IBase.Location.t -> BufferOverrunDomain.LatestPrune.t -> checked_t
val report_errors : report:(Condition.t -> ConditionTrace.t -> IBase.IssueType.t -> unit) -> checked_t -> unit
val for_summary : checked_t -> summary_t
BufferOverrunProofObligations.ConditionSet
val empty : checked_t
val pp : Stdlib.Format.formatter -> checked_t -> unit
val pp_summary : Stdlib.Format.formatter -> summary_t -> unit
val add_array_access : IBase.Location.t -> offset:ItvPure.t -> idx:ItvPure.t -> size:ItvPure.t -> last_included:bool -> idx_traces:BufferOverrunTrace.Set.t -> arr_traces:BufferOverrunTrace.Set.t -> latest_prune:BufferOverrunDomain.LatestPrune.t -> checked_t -> checked_t
val add_alloc_size : IBase.Location.t -> can_be_zero:bool -> length:ItvPure.t -> BufferOverrunTrace.Set.t -> BufferOverrunDomain.LatestPrune.t -> checked_t -> checked_t
val add_binary_operation : IR.Typ.IntegerWidths.t -> IBase.Location.t -> IR.Procname.t -> IR.Binop.t -> lhs:ItvPure.t -> rhs:ItvPure.t -> lhs_traces:BufferOverrunTrace.Set.t -> rhs_traces:BufferOverrunTrace.Set.t -> latest_prune:BufferOverrunDomain.LatestPrune.t -> checked_t -> checked_t
val join : checked_t -> checked_t -> checked_t
val subst : summary_t -> (mode:BufferOverrunSemantics.eval_mode -> BufferOverrunDomain.eval_sym_trace) -> IR.Procname.t -> IBase.Location.t -> BufferOverrunDomain.LatestPrune.t -> checked_t
val report_errors : report:(Condition.t -> ConditionTrace.t -> IBase.IssueType.t -> unit) -> checked_t -> unit
val for_summary : checked_t -> summary_t
BufferOverrunTrace.Issue
Trace set with issue information
include IStdlib.PrettyPrintable.PrintableOrderedType
include IStdlib.PrettyPrintable.PrintableType with type t := t
val pp : IStdlib.PrettyPrintable.F.formatter -> t -> unit
val binary : IBase.Location.t -> binary -> Set.t -> Set.t -> t
Construct issue trace of binary operation. When binary
is ArrayAccess
, the former Set.t
typed parameter is offset
and the latter is length
of array access.
val alloc : IBase.Location.t -> Set.t -> t
Construct issue trace of allocation
val call : IBase.Location.t -> Set.t -> t -> t
Merge caller's trace set and callee's issue, i.e., call location caller callee
val has_risky : t -> bool
Check if the issue trace includes risky function calls by Through
val has_unknown : t -> bool
Check if the issue trace includes unknown function calls
val exists_str : f:(string -> bool) -> t -> bool
Check if the issue trace includes an abstract location that satisfies f
val make_err_trace : description:string -> t -> (string * Absint.Errlog.loc_trace) list
Convert to the common Errlog
format. The return value is a list of labelled Errlog.loc_trace
s.
BufferOverrunTrace.Issue
Trace set with issue information
include IStdlib.PrettyPrintable.PrintableOrderedType
include IStdlib.PrettyPrintable.PrintableType with type t := t
val pp : IStdlib.PrettyPrintable.F.formatter -> t -> unit
val binary : IBase.Location.t -> binary -> Set.t -> Set.t -> t
Construct issue trace of binary operation. When binary
is ArrayAccess
, the former Set.t
typed parameter is offset
and the latter is length
of array access.
val alloc : IBase.Location.t -> Set.t -> t
Construct issue trace of allocation
val call : IBase.Location.t -> Set.t -> t -> t
Merge caller's trace set and callee's issue, i.e., call location caller callee
val has_unknown : t -> bool
Check if the issue trace includes unknown function calls
val exists_str : f:(string -> bool) -> t -> bool
Check if the issue trace includes an abstract location that satisfies f
val make_err_trace : description:string -> t -> (string * Absint.Errlog.loc_trace) list
Convert to the common Errlog
format. The return value is a list of labelled Errlog.loc_trace
s.
BO.BufferOverrunTrace
type final
=
| UnknownFrom of IR.Procname.t option |
Final unknown function in trace
type elem
=
| ArrayDeclaration | |
| Assign of AbsLoc.PowLoc.t | |
| Global of AbsLoc.Loc.t | |
| JavaIntDecleration | |
| Parameter of AbsLoc.Loc.t | |
| SetArraySize | |
| Through of {
} |
Trace elements
module Set : sig ... end
module Issue : sig ... end
Trace set with issue information
BO.BufferOverrunTrace
type final
=
| UnknownFrom of IR.Procname.t option |
Final unknown function in trace
type elem
=
| ArrayDeclaration |
| Assign of AbsLoc.PowLoc.t |
| Global of AbsLoc.Loc.t |
| JavaIntDecleration |
| Parameter of AbsLoc.Loc.t |
| SetArraySize |
| Through |
Trace elements
module Set : sig ... end
module Issue : sig ... end
Trace set with issue information
Symb.SymbolPath
val compare_deref_kind : deref_kind -> deref_kind -> int
type prim
=
| Pvar of IR.Pvar.t | ||||
| Deref of deref_kind * partial | ||||
| Callsite of {
} |
|
and partial
= prim BufferOverrunField.t
type t
= private
| Normal of partial | ||
| Offset of {
} | ||
| Length of {
} | ||
| Modeled of {
} |
val equal_partial : partial -> partial -> bool
val pp_mark : markup:bool -> F.formatter -> t -> unit
val pp_partial : F.formatter -> partial -> unit
val pp_partial_paren : paren:bool -> F.formatter -> partial -> unit
val of_pvar : IR.Pvar.t -> partial
val of_callsite : ?obj_path:partial -> ret_typ:IR.Typ.t -> Absint.CallSite.t -> partial
val deref : deref_kind:deref_kind -> partial -> partial
val append_field : ?typ:IR.Typ.t -> partial -> IR.Fieldname.t -> partial
val append_star_field : partial -> IR.Fieldname.t -> partial
val normal : partial -> t
val offset : partial -> is_void:bool -> t
val length : partial -> is_void:bool -> t
val modeled : partial -> is_expensive:bool -> t
val is_this : partial -> bool
val is_request : partial -> bool
val get_pvar : partial -> IR.Pvar.t option
val represents_multiple_values : partial -> bool
val represents_multiple_values_sound : partial -> bool
val represents_callsite_sound_partial : partial -> bool
val exists_pvar_partial : f:(IR.Pvar.t -> bool) -> partial -> bool
val exists_str_partial : f:(string -> bool) -> partial -> bool
val is_void_ptr_path : t -> bool
val is_cpp_vector_elem : partial -> bool
val is_global_partial : partial -> bool
Symb.SymbolPath
val compare_deref_kind : deref_kind -> deref_kind -> int
type prim
=
| Pvar of IR.Pvar.t | ||||
| Deref of deref_kind * partial | ||||
| Callsite of {
} |
|
and partial
= prim BufferOverrunField.t
type t
= private
| Normal of partial | ||
| Offset of {
} | ||
| Length of {
} | ||
| Modeled of {
} |
val equal_partial : partial -> partial -> bool
val pp_mark : markup:bool -> F.formatter -> t -> unit
val pp_partial : F.formatter -> partial -> unit
val pp_partial_paren : paren:bool -> F.formatter -> partial -> unit
val of_pvar : IR.Pvar.t -> partial
val of_callsite : ?obj_path:partial -> ret_typ:IR.Typ.t -> Absint.CallSite.t -> partial
val deref : deref_kind:deref_kind -> partial -> partial
val append_field : ?typ:IR.Typ.t -> partial -> IR.Fieldname.t -> partial
val append_star_field : partial -> IR.Fieldname.t -> partial
val normal : partial -> t
val offset : partial -> is_void:bool -> t
val length : partial -> is_void:bool -> t
val modeled : partial -> is_expensive:bool -> t
val is_this : partial -> bool
val get_pvar : partial -> IR.Pvar.t option
val represents_multiple_values : partial -> bool
val represents_multiple_values_sound : partial -> bool
val represents_callsite_sound_partial : partial -> bool
val exists_pvar_partial : f:(IR.Pvar.t -> bool) -> partial -> bool
val exists_str_partial : f:(string -> bool) -> partial -> bool
val is_void_ptr_path : t -> bool
val is_cpp_vector_elem : partial -> bool
val is_global_partial : partial -> bool
BO.Symb
module BoundEnd : sig ... end
module SymbolPath : sig ... end
module Symbol : sig ... end
module SymbolSet : sig ... end
module SymbolMap : sig ... end
module SymbolPathSet : IStdlib.PrettyPrintable.PPSet with type PPSet.elt = SymbolPath.partial
BO.Symb
module BoundEnd : sig ... end
module SymbolPath : sig ... end
module Symbol : sig ... end
module SymbolSet : sig ... end
module SymbolMap : sig ... end
BO__BufferOverrunDomain.Taint
include Absint.AbstractDomain.WithBottom
include Absint.AbstractDomain.S
include Absint.AbstractDomain.NoJoin
include IStdlib.PrettyPrintable.PrintableType
val pp : IStdlib.PrettyPrintable.F.formatter -> t -> unit
val bottom : t
The bottom value of the domain.
val is_bottom : t -> bool
Return true if this is the bottom value
val compare : t -> t -> int
val pp : Stdlib.Format.formatter -> t -> unit
val is_tainted : t -> bool
val param_of_path : BO.Symb.SymbolPath.partial -> t
val tainted_of_path : BO.Symb.SymbolPath.partial -> t
type eval_taint
= BO.Symb.SymbolPath.partial -> t
val subst : t -> eval_taint -> t
BO__BufferOverrunDomain.Val
type t
=
{
itv : BO.Itv.t; | Interval |
itv_thresholds : ItvThresholds.t; | |
itv_updated_by : ItvUpdatedBy.t; | |
modeled_range : ModeledRange.t; | |
taint : Taint.t; | |
powloc : BO.AbsLoc.PowLoc.t; | Simple pointers |
arrayblk : BO.ArrayBlk.t; | Array blocks |
traces : BO.BufferOverrunTrace.Set.t; |
}
include Absint.AbstractDomain.S with type t := t
include Absint.AbstractDomain.NoJoin
include IStdlib.PrettyPrintable.PrintableType
val pp : IStdlib.PrettyPrintable.F.formatter -> t -> unit
val bot : t
val of_big_int : ItvThresholds.elt -> t
val of_c_array_alloc : BO.AbsLoc.Allocsite.t -> stride:int option -> offset:BO.Itv.t -> size:BO.Itv.t -> traces:BO.BufferOverrunTrace.Set.t -> t
Construct C array allocation. stride
is a byte size of cell, offset
is initial offset of pointer which is usually zero, and size
is a total number of cells.
val of_java_array_alloc : BO.AbsLoc.Allocsite.t -> length:BO.Itv.t -> traces:BO.BufferOverrunTrace.Set.t -> t
Construct Java array allocation. size
is a total number of cells
val of_int : int -> t
val of_int_lit : IR.IntLit.t -> t
val of_itv : ?traces:BO.BufferOverrunTrace.Set.t -> ?taint:Taint.t -> BO.Itv.t -> t
val of_literal_string : IR.Typ.IntegerWidths.t -> string -> t
val of_loc : ?traces:BO.BufferOverrunTrace.Set.t -> BO.AbsLoc.Loc.t -> t
val of_pow_loc : traces:BO.BufferOverrunTrace.Set.t -> BO.AbsLoc.PowLoc.t -> t
val unknown_locs : t
val unknown_from : IR.Typ.t -> callee_pname:IR.Procname.t option -> location:IBase.Location.t -> t
Unknown return value of callee_pname
val is_bot : t -> bool
Check if the value is bottom
val is_mone : t -> bool
Check if the value is [-1,-1]
val get_all_locs : t -> BO.AbsLoc.PowLoc.t
Get all locations, including pointers and array blocks
val get_array_locs : t -> BO.AbsLoc.PowLoc.t
Get locations of array blocks
val get_array_blk : t -> BO.ArrayBlk.t
val get_range_of_iterator : t -> t
Get a range of an iterator value, for example, if iterator value is [lb,ub]
, it returns [0,ub]
.
val get_itv : t -> BO.Itv.t
val get_modeled_range : t -> ModeledRange.t
val get_pow_loc : t -> BO.AbsLoc.PowLoc.t
val get_taint : t -> Taint.t
val get_traces : t -> BO.BufferOverrunTrace.Set.t
val set_array_length : IBase.Location.t -> length:t -> t -> t
val set_array_offset : IBase.Location.t -> BO.Itv.t -> t -> t
val set_array_stride : Z.t -> t -> t
val set_itv_updated_by_addition : t -> t
val set_itv_updated_by_multiplication : t -> t
val set_itv_updated_by_unknown : t -> t
val set_modeled_range : ModeledRange.t -> t -> t
val (lnot) : t -> t
val neg : t -> t
val plus_a : ?f_trace:(BO.BufferOverrunTrace.Set.t -> BO.BufferOverrunTrace.Set.t -> BO.BufferOverrunTrace.Set.t) -> t -> t -> t
Semantics of Binop.PlusA
. f_trace
merges traces of the operands. If f_trace
is not given, it uses a default heuristic merge function.
val plus_pi : t -> t -> t
val minus_a : ?f_trace:(BO.BufferOverrunTrace.Set.t -> BO.BufferOverrunTrace.Set.t -> BO.BufferOverrunTrace.Set.t) -> t -> t -> t
val minus_pi : t -> t -> t
val minus_pp : t -> t -> t
val mult : ?f_trace:(BO.BufferOverrunTrace.Set.t -> BO.BufferOverrunTrace.Set.t -> BO.BufferOverrunTrace.Set.t) -> t -> t -> t
val div : ?f_trace:(BO.BufferOverrunTrace.Set.t -> BO.BufferOverrunTrace.Set.t -> BO.BufferOverrunTrace.Set.t) -> t -> t -> t
val mod_sem : ?f_trace:(BO.BufferOverrunTrace.Set.t -> BO.BufferOverrunTrace.Set.t -> BO.BufferOverrunTrace.Set.t) -> t -> t -> t
val shiftlt : ?f_trace:(BO.BufferOverrunTrace.Set.t -> BO.BufferOverrunTrace.Set.t -> BO.BufferOverrunTrace.Set.t) -> t -> t -> t
val shiftrt : ?f_trace:(BO.BufferOverrunTrace.Set.t -> BO.BufferOverrunTrace.Set.t -> BO.BufferOverrunTrace.Set.t) -> t -> t -> t
val lt_sem : t -> t -> t
val gt_sem : t -> t -> t
val le_sem : t -> t -> t
val ge_sem : t -> t -> t
val eq_sem : t -> t -> t
val ne_sem : t -> t -> t
val band_sem : ?f_trace:(BO.BufferOverrunTrace.Set.t -> BO.BufferOverrunTrace.Set.t -> BO.BufferOverrunTrace.Set.t) -> t -> t -> t
val land_sem : t -> t -> t
val lor_sem : t -> t -> t
val unknown_bit : t -> t
Semantic function for some bit operators which are hard to express in the domain, e.g., Unop.BNot
.
val prune_eq : t -> t -> t
Pruning semantics for Binop.Eq
. This prunes value of x
when given x == y
, i.e., prune_eq x y
.
val prune_ne : t -> t -> t
Pruning semantics for Binop.Ne
. This prunes value of x
when given x != y
, i.e., prune_ne x y
.
val prune_lt : t -> t -> t
Pruning semantics for Binop.Lt
. This prunes value of x
when given x < y
, i.e., prune_lt x y
.
val prune_binop : IR.Binop.t -> t -> t -> t
Prune value of x
when given x bop y
, i.e., prune_binop bop x y
val add_assign_trace_elem : IBase.Location.t -> BO.AbsLoc.PowLoc.t -> t -> t
Add assign trace for given abstract locations
val cast : IR.Typ.t -> t -> t
Semantics of cast. This updates type information in pointer values, rather than re-calculating sizes of array blocks.
val subst : t -> eval_sym_trace -> IBase.Location.t -> t
Substitution of symbols in the value
val transform_array_length : IBase.Location.t -> f:(BO.Itv.t -> BO.Itv.t) -> t -> t
Apply f
on array lengths in the value
module Itv : sig ... end
BO__BufferOverrunDomain.Val
type t
=
{
itv : BO.Itv.t; | Interval |
itv_thresholds : ItvThresholds.t; | |
itv_updated_by : ItvUpdatedBy.t; | |
modeled_range : ModeledRange.t; | |
powloc : BO.AbsLoc.PowLoc.t; | Simple pointers |
arrayblk : BO.ArrayBlk.t; | Array blocks |
traces : BO.BufferOverrunTrace.Set.t; |
}
include Absint.AbstractDomain.S with type t := t
include Absint.AbstractDomain.NoJoin
include IStdlib.PrettyPrintable.PrintableType
val pp : IStdlib.PrettyPrintable.F.formatter -> t -> unit
val bot : t
val of_big_int : ItvThresholds.elt -> t
val of_c_array_alloc : BO.AbsLoc.Allocsite.t -> stride:int option -> offset:BO.Itv.t -> size:BO.Itv.t -> traces:BO.BufferOverrunTrace.Set.t -> t
Construct C array allocation. stride
is a byte size of cell, offset
is initial offset of pointer which is usually zero, and size
is a total number of cells.
val of_java_array_alloc : BO.AbsLoc.Allocsite.t -> length:BO.Itv.t -> traces:BO.BufferOverrunTrace.Set.t -> t
Construct Java array allocation. size
is a total number of cells
val of_int : int -> t
val of_int_lit : IR.IntLit.t -> t
val of_itv : ?traces:BO.BufferOverrunTrace.Set.t -> BO.Itv.t -> t
val of_literal_string : IR.Typ.IntegerWidths.t -> string -> t
val of_loc : ?traces:BO.BufferOverrunTrace.Set.t -> BO.AbsLoc.Loc.t -> t
val of_pow_loc : traces:BO.BufferOverrunTrace.Set.t -> BO.AbsLoc.PowLoc.t -> t
val unknown_locs : t
val unknown_from : IR.Typ.t -> callee_pname:IR.Procname.t option -> location:IBase.Location.t -> t
Unknown return value of callee_pname
val is_bot : t -> bool
Check if the value is bottom
val is_mone : t -> bool
Check if the value is [-1,-1]
val get_all_locs : t -> BO.AbsLoc.PowLoc.t
Get all locations, including pointers and array blocks
val get_array_locs : t -> BO.AbsLoc.PowLoc.t
Get locations of array blocks
val get_array_blk : t -> BO.ArrayBlk.t
val get_range_of_iterator : t -> t
Get a range of an iterator value, for example, if iterator value is [lb,ub]
, it returns [0,ub]
.
val get_itv : t -> BO.Itv.t
val get_modeled_range : t -> ModeledRange.t
val get_pow_loc : t -> BO.AbsLoc.PowLoc.t
val get_traces : t -> BO.BufferOverrunTrace.Set.t
val set_array_length : IBase.Location.t -> length:t -> t -> t
val set_array_offset : IBase.Location.t -> BO.Itv.t -> t -> t
val set_array_stride : Z.t -> t -> t
val set_itv_updated_by_addition : t -> t
val set_itv_updated_by_multiplication : t -> t
val set_itv_updated_by_unknown : t -> t
val set_modeled_range : ModeledRange.t -> t -> t
val (lnot) : t -> t
val neg : t -> t
val plus_a : ?f_trace:(BO.BufferOverrunTrace.Set.t -> BO.BufferOverrunTrace.Set.t -> BO.BufferOverrunTrace.Set.t) -> t -> t -> t
Semantics of Binop.PlusA
. f_trace
merges traces of the operands. If f_trace
is not given, it uses a default heuristic merge function.
val plus_pi : t -> t -> t
val minus_a : ?f_trace:(BO.BufferOverrunTrace.Set.t -> BO.BufferOverrunTrace.Set.t -> BO.BufferOverrunTrace.Set.t) -> t -> t -> t
val minus_pi : t -> t -> t
val minus_pp : t -> t -> t
val mult : ?f_trace:(BO.BufferOverrunTrace.Set.t -> BO.BufferOverrunTrace.Set.t -> BO.BufferOverrunTrace.Set.t) -> t -> t -> t
val div : ?f_trace:(BO.BufferOverrunTrace.Set.t -> BO.BufferOverrunTrace.Set.t -> BO.BufferOverrunTrace.Set.t) -> t -> t -> t
val mod_sem : ?f_trace:(BO.BufferOverrunTrace.Set.t -> BO.BufferOverrunTrace.Set.t -> BO.BufferOverrunTrace.Set.t) -> t -> t -> t
val shiftlt : ?f_trace:(BO.BufferOverrunTrace.Set.t -> BO.BufferOverrunTrace.Set.t -> BO.BufferOverrunTrace.Set.t) -> t -> t -> t
val shiftrt : ?f_trace:(BO.BufferOverrunTrace.Set.t -> BO.BufferOverrunTrace.Set.t -> BO.BufferOverrunTrace.Set.t) -> t -> t -> t
val lt_sem : t -> t -> t
val gt_sem : t -> t -> t
val le_sem : t -> t -> t
val ge_sem : t -> t -> t
val eq_sem : t -> t -> t
val ne_sem : t -> t -> t
val band_sem : ?f_trace:(BO.BufferOverrunTrace.Set.t -> BO.BufferOverrunTrace.Set.t -> BO.BufferOverrunTrace.Set.t) -> t -> t -> t
val land_sem : t -> t -> t
val lor_sem : t -> t -> t
val unknown_bit : t -> t
Semantic function for some bit operators which are hard to express in the domain, e.g., Unop.BNot
.
val prune_eq : t -> t -> t
Pruning semantics for Binop.Eq
. This prunes value of x
when given x == y
, i.e., prune_eq x y
.
val prune_ne : t -> t -> t
Pruning semantics for Binop.Ne
. This prunes value of x
when given x != y
, i.e., prune_ne x y
.
val prune_lt : t -> t -> t
Pruning semantics for Binop.Lt
. This prunes value of x
when given x < y
, i.e., prune_lt x y
.
val prune_binop : IR.Binop.t -> t -> t -> t
Prune value of x
when given x bop y
, i.e., prune_binop bop x y
val add_assign_trace_elem : IBase.Location.t -> BO.AbsLoc.PowLoc.t -> t -> t
Add assign trace for given abstract locations
val cast : IR.Typ.t -> t -> t
Semantics of cast. This updates type information in pointer values, rather than re-calculating sizes of array blocks.
val subst : t -> eval_sym_trace -> IBase.Location.t -> t
Substitution of symbols in the value
val transform_array_length : IBase.Location.t -> f:(BO.Itv.t -> BO.Itv.t) -> t -> t
Apply f
on array lengths in the value
module Itv : sig ... end
BO__BufferOverrunDomain
module ItvThresholds : Absint.AbstractDomain.FiniteSetS with type FiniteSetS.elt = Z.t
Set of integers for threshold widening
module ItvUpdatedBy : sig ... end
Domain for recording which operations are used for evaluating interval values
module ModeledRange : sig ... end
ModeledRange
represents how many times the interval value can be updated by modeled functions. This domain is to support the case where there are mismatches between value of a control variable and actual number of loop iterations. For example,
module type TaintS = sig ... end
type eval_sym_trace
=
{
eval_sym : BO.Bounds.Bound.eval_sym; | evaluating symbol |
trace_of_sym : BO.Symb.Symbol.t -> BO.BufferOverrunTrace.Set.t; | getting traces of symbol |
eval_locpath : BO.AbsLoc.PowLoc.eval_locpath; | evaluating path |
eval_taint : Taint.eval_taint; | evaluating taint of path |
}
type for on-demand symbol evaluation in Inferbo
module Val : sig ... end
module KeyRhs : sig ... end
Right hand side of the alias domain. See AliasTarget
.
module AliasTarget : sig ... end
module AliasTargets : sig ... end
module AliasRet : sig ... end
Alias domain for return values of callees
module CoreVal : sig ... end
CoreVal
is similar to Val
, but its compare function is defined only on core parts, interval, pointers, and array blocks, of abstract value. This domain is to keep pruned values, where we do not need to care about the other fields in the abstract values.
module PruningExp : sig ... end
Domain to keep assumed expressions
module PrunedVal : sig ... end
Domain to keep pruned history, which are pairs of a pruned value and an assumed expression
module PrunePairs : sig ... end
PrunePairs
is a map from abstract locations to abstract values that represents pruned results in the latest pruning. It uses InvertedMap
because more pruning means smaller abstract states.
module LatestPrune : sig ... end
Domain to keep latest pruned values
module Reachability : sig ... end
Domain for reachability check
module LoopHeadLoc : sig ... end
module MemReach : sig ... end
Domain for memory of reachable node
module Mem : sig ... end
BO__BufferOverrunDomain
module ItvThresholds : Absint.AbstractDomain.FiniteSetS with type FiniteSetS.elt = Z.t
Set of integers for threshold widening
module ItvUpdatedBy : sig ... end
Domain for recording which operations are used for evaluating interval values
module ModeledRange : sig ... end
ModeledRange
represents how many times the interval value can be updated by modeled functions. This domain is to support the case where there are mismatches between value of a control variable and actual number of loop iterations. For example,
type eval_sym_trace
=
{
eval_sym : BO.Bounds.Bound.eval_sym; | evaluating symbol |
trace_of_sym : BO.Symb.Symbol.t -> BO.BufferOverrunTrace.Set.t; | getting traces of symbol |
eval_locpath : BO.AbsLoc.PowLoc.eval_locpath; | evaluating path |
}
type for on-demand symbol evaluation in Inferbo
module Val : sig ... end
module KeyRhs : sig ... end
Right hand side of the alias domain. See AliasTarget
.
module AliasTarget : sig ... end
module AliasTargets : sig ... end
module AliasRet : sig ... end
Alias domain for return values of callees
module CoreVal : sig ... end
CoreVal
is similar to Val
, but its compare function is defined only on core parts, interval, pointers, and array blocks, of abstract value. This domain is to keep pruned values, where we do not need to care about the other fields in the abstract values.
module PruningExp : sig ... end
Domain to keep assumed expressions
module PrunedVal : sig ... end
Domain to keep pruned history, which are pairs of a pruned value and an assumed expression
module PrunePairs : sig ... end
PrunePairs
is a map from abstract locations to abstract values that represents pruned results in the latest pruning. It uses InvertedMap
because more pruning means smaller abstract states.
module LatestPrune : sig ... end
Domain to keep latest pruned values
module Reachability : sig ... end
Domain for reachability check
module LoopHeadLoc : sig ... end
module MemReach : sig ... end
Domain for memory of reachable node
module Mem : sig ... end
BO__BufferOverrunDomain.TaintS
include Absint.AbstractDomain.WithBottom
include Absint.AbstractDomain.S
include Absint.AbstractDomain.NoJoin
include IStdlib.PrettyPrintable.PrintableType
val pp : IStdlib.PrettyPrintable.F.formatter -> t -> unit
val bottom : t
The bottom value of the domain.
val is_bottom : t -> bool
Return true if this is the bottom value
val compare : t -> t -> int
val pp : Stdlib.Format.formatter -> t -> unit
val is_tainted : t -> bool
val param_of_path : BO.Symb.SymbolPath.partial -> t
val tainted_of_path : BO.Symb.SymbolPath.partial -> t
type eval_taint
= BO.Symb.SymbolPath.partial -> t
val subst : t -> eval_taint -> t
BO__BufferOverrunProofObligations.ConditionSet
val empty : checked_t
val pp : Stdlib.Format.formatter -> checked_t -> unit
val pp_summary : Stdlib.Format.formatter -> summary_t -> unit
val add_array_access : IBase.Location.t -> offset:ItvPure.t -> idx:ItvPure.t -> size:ItvPure.t -> last_included:bool -> taint:BO.BufferOverrunDomain.Taint.t -> idx_traces:BO.BufferOverrunTrace.Set.t -> arr_traces:BO.BufferOverrunTrace.Set.t -> latest_prune:BO.BufferOverrunDomain.LatestPrune.t -> checked_t -> checked_t
val add_alloc_size : IBase.Location.t -> can_be_zero:bool -> length:ItvPure.t -> taint:BO.BufferOverrunDomain.Taint.t -> BO.BufferOverrunTrace.Set.t -> BO.BufferOverrunDomain.LatestPrune.t -> checked_t -> checked_t
val add_binary_operation : IR.Typ.IntegerWidths.t -> IBase.Location.t -> IR.Procname.t -> IR.Binop.t -> lhs:ItvPure.t -> rhs:ItvPure.t -> lhs_traces:BO.BufferOverrunTrace.Set.t -> rhs_traces:BO.BufferOverrunTrace.Set.t -> latest_prune:BO.BufferOverrunDomain.LatestPrune.t -> checked_t -> checked_t
val join : checked_t -> checked_t -> checked_t
val subst : summary_t -> (mode:BO.BufferOverrunSemantics.eval_mode -> BO.BufferOverrunDomain.eval_sym_trace) -> IR.Procname.t -> IBase.Location.t -> BO.BufferOverrunDomain.LatestPrune.t -> checked_t
val report_errors : report:(Condition.t -> ConditionTrace.t -> IBase.IssueType.t -> unit) -> checked_t -> unit
val for_summary : checked_t -> summary_t
BO__BufferOverrunProofObligations.ConditionSet
val empty : checked_t
val pp : Stdlib.Format.formatter -> checked_t -> unit
val pp_summary : Stdlib.Format.formatter -> summary_t -> unit
val add_array_access : IBase.Location.t -> offset:ItvPure.t -> idx:ItvPure.t -> size:ItvPure.t -> last_included:bool -> idx_traces:BO.BufferOverrunTrace.Set.t -> arr_traces:BO.BufferOverrunTrace.Set.t -> latest_prune:BO.BufferOverrunDomain.LatestPrune.t -> checked_t -> checked_t
val add_alloc_size : IBase.Location.t -> can_be_zero:bool -> length:ItvPure.t -> BO.BufferOverrunTrace.Set.t -> BO.BufferOverrunDomain.LatestPrune.t -> checked_t -> checked_t
val add_binary_operation : IR.Typ.IntegerWidths.t -> IBase.Location.t -> IR.Procname.t -> IR.Binop.t -> lhs:ItvPure.t -> rhs:ItvPure.t -> lhs_traces:BO.BufferOverrunTrace.Set.t -> rhs_traces:BO.BufferOverrunTrace.Set.t -> latest_prune:BO.BufferOverrunDomain.LatestPrune.t -> checked_t -> checked_t
val join : checked_t -> checked_t -> checked_t
val subst : summary_t -> (mode:BO.BufferOverrunSemantics.eval_mode -> BO.BufferOverrunDomain.eval_sym_trace) -> IR.Procname.t -> IBase.Location.t -> BO.BufferOverrunDomain.LatestPrune.t -> checked_t
val report_errors : report:(Condition.t -> ConditionTrace.t -> IBase.IssueType.t -> unit) -> checked_t -> unit
val for_summary : checked_t -> summary_t
BO__BufferOverrunTrace.Issue
Trace set with issue information
include IStdlib.PrettyPrintable.PrintableOrderedType
include IStdlib.PrettyPrintable.PrintableType with type t := t
val pp : IStdlib.PrettyPrintable.F.formatter -> t -> unit
val binary : IBase.Location.t -> binary -> Set.t -> Set.t -> t
Construct issue trace of binary operation. When binary
is ArrayAccess
, the former Set.t
typed parameter is offset
and the latter is length
of array access.
val alloc : IBase.Location.t -> Set.t -> t
Construct issue trace of allocation
val call : IBase.Location.t -> Set.t -> t -> t
Merge caller's trace set and callee's issue, i.e., call location caller callee
val has_risky : t -> bool
Check if the issue trace includes risky function calls by Through
val has_unknown : t -> bool
Check if the issue trace includes unknown function calls
val exists_str : f:(string -> bool) -> t -> bool
Check if the issue trace includes an abstract location that satisfies f
val make_err_trace : description:string -> t -> (string * Absint.Errlog.loc_trace) list
Convert to the common Errlog
format. The return value is a list of labelled Errlog.loc_trace
s.
BO__BufferOverrunTrace.Issue
Trace set with issue information
include IStdlib.PrettyPrintable.PrintableOrderedType
include IStdlib.PrettyPrintable.PrintableType with type t := t
val pp : IStdlib.PrettyPrintable.F.formatter -> t -> unit
val binary : IBase.Location.t -> binary -> Set.t -> Set.t -> t
Construct issue trace of binary operation. When binary
is ArrayAccess
, the former Set.t
typed parameter is offset
and the latter is length
of array access.
val alloc : IBase.Location.t -> Set.t -> t
Construct issue trace of allocation
val call : IBase.Location.t -> Set.t -> t -> t
Merge caller's trace set and callee's issue, i.e., call location caller callee
val has_unknown : t -> bool
Check if the issue trace includes unknown function calls
val exists_str : f:(string -> bool) -> t -> bool
Check if the issue trace includes an abstract location that satisfies f
val make_err_trace : description:string -> t -> (string * Absint.Errlog.loc_trace) list
Convert to the common Errlog
format. The return value is a list of labelled Errlog.loc_trace
s.
BO__BufferOverrunTrace
type final
=
| UnknownFrom of IR.Procname.t option |
Final unknown function in trace
type elem
=
| ArrayDeclaration | |
| Assign of BO.AbsLoc.PowLoc.t | |
| Global of BO.AbsLoc.Loc.t | |
| JavaIntDecleration | |
| Parameter of BO.AbsLoc.Loc.t | |
| SetArraySize | |
| Through of {
} |
Trace elements
module Set : sig ... end
module Issue : sig ... end
Trace set with issue information
BO__BufferOverrunTrace
type final
=
| UnknownFrom of IR.Procname.t option |
Final unknown function in trace
type elem
=
| ArrayDeclaration |
| Assign of BO.AbsLoc.PowLoc.t |
| Global of BO.AbsLoc.Loc.t |
| JavaIntDecleration |
| Parameter of BO.AbsLoc.Loc.t |
| SetArraySize |
| Through |
Trace elements
module Set : sig ... end
module Issue : sig ... end
Trace set with issue information
BO__Symb.SymbolPath
val compare_deref_kind : deref_kind -> deref_kind -> int
type prim
=
| Pvar of IR.Pvar.t | ||||
| Deref of deref_kind * partial | ||||
| Callsite of {
} |
|
and partial
= prim BO.BufferOverrunField.t
type t
= private
| Normal of partial | ||
| Offset of {
} | ||
| Length of {
} | ||
| Modeled of {
} |
val equal_partial : partial -> partial -> bool
val pp_mark : markup:bool -> F.formatter -> t -> unit
val pp_partial : F.formatter -> partial -> unit
val pp_partial_paren : paren:bool -> F.formatter -> partial -> unit
val of_pvar : IR.Pvar.t -> partial
val of_callsite : ?obj_path:partial -> ret_typ:IR.Typ.t -> Absint.CallSite.t -> partial
val deref : deref_kind:deref_kind -> partial -> partial
val append_field : ?typ:IR.Typ.t -> partial -> IR.Fieldname.t -> partial
val append_star_field : partial -> IR.Fieldname.t -> partial
val normal : partial -> t
val offset : partial -> is_void:bool -> t
val length : partial -> is_void:bool -> t
val modeled : partial -> is_expensive:bool -> t
val is_this : partial -> bool
val is_request : partial -> bool
val get_pvar : partial -> IR.Pvar.t option
val represents_multiple_values : partial -> bool
val represents_multiple_values_sound : partial -> bool
val represents_callsite_sound_partial : partial -> bool
val exists_pvar_partial : f:(IR.Pvar.t -> bool) -> partial -> bool
val exists_str_partial : f:(string -> bool) -> partial -> bool
val is_void_ptr_path : t -> bool
val is_cpp_vector_elem : partial -> bool
val is_global_partial : partial -> bool
BO__Symb.SymbolPath
val compare_deref_kind : deref_kind -> deref_kind -> int
type prim
=
| Pvar of IR.Pvar.t | ||||
| Deref of deref_kind * partial | ||||
| Callsite of {
} |
|
and partial
= prim BO.BufferOverrunField.t
type t
= private
| Normal of partial | ||
| Offset of {
} | ||
| Length of {
} | ||
| Modeled of {
} |
val equal_partial : partial -> partial -> bool
val pp_mark : markup:bool -> F.formatter -> t -> unit
val pp_partial : F.formatter -> partial -> unit
val pp_partial_paren : paren:bool -> F.formatter -> partial -> unit
val of_pvar : IR.Pvar.t -> partial
val of_callsite : ?obj_path:partial -> ret_typ:IR.Typ.t -> Absint.CallSite.t -> partial
val deref : deref_kind:deref_kind -> partial -> partial
val append_field : ?typ:IR.Typ.t -> partial -> IR.Fieldname.t -> partial
val append_star_field : partial -> IR.Fieldname.t -> partial
val normal : partial -> t
val offset : partial -> is_void:bool -> t
val length : partial -> is_void:bool -> t
val modeled : partial -> is_expensive:bool -> t
val is_this : partial -> bool
val get_pvar : partial -> IR.Pvar.t option
val represents_multiple_values : partial -> bool
val represents_multiple_values_sound : partial -> bool
val represents_callsite_sound_partial : partial -> bool
val exists_pvar_partial : f:(IR.Pvar.t -> bool) -> partial -> bool
val exists_str_partial : f:(string -> bool) -> partial -> bool
val is_void_ptr_path : t -> bool
val is_cpp_vector_elem : partial -> bool
val is_global_partial : partial -> bool
BO__Symb
module BoundEnd : sig ... end
module SymbolPath : sig ... end
module Symbol : sig ... end
module SymbolSet : sig ... end
module SymbolMap : sig ... end
module SymbolPathSet : IStdlib.PrettyPrintable.PPSet with type PPSet.elt = SymbolPath.partial
BO__Symb
module BoundEnd : sig ... end
module SymbolPath : sig ... end
module Symbol : sig ... end
module SymbolSet : sig ... end
module SymbolMap : sig ... end
IBase.Config
type os_type
=
| Unix |
| Win32 |
| Cygwin |
type build_system
=
| BAnt |
| BBuck |
| BClang |
| BGradle |
| BJava |
| BJavac |
| BMake |
| BMvn |
| BNdk |
| BXcode |
type scheduler
=
| File |
| Restart |
| SyntacticCallGraph |
val build_system_of_exe_name : string -> build_system
val string_of_build_system : build_system -> string
val env_inside_maven : IStdlib.IStd.Unix.env
val anonymous_block_num_sep : string
val anonymous_block_prefix : string
val append_buck_flavors : string list
val assign : string
val biabduction_models_dir : string
val biabduction_models_jar : string
val biabduction_models_src_dir : string
val bin_dir : string
val bound_error_allowed_in_procedure_call : bool
val clang_exe_aliases : string list
val clang_initializer_prefix : string
val clang_inner_destructor_prefix : string
val clang_plugin_path : string
val classpath : string option
val default_failure_name : string
val dotty_frontend_output : string
val etc_dir : string
val fail_on_issue_exit_code : int
val fcp_dir : string
val idempotent_getters : bool
val initial_analysis_time : float
val ivar_attributes : string
val java_lambda_marker_infix : string
marker to recognize methods generated by javalib to eliminate lambdas
val lib_dir : string
val load_average : float option
val max_narrows : int
val max_widens : int
val meet_level : int
val nsnotification_center_checker_backend : bool
val os_type : os_type
val passthroughs : bool
val patterns_modeled_expensive : string * Yojson.Basic.t
val patterns_never_returning_null : string * Yojson.Basic.t
val patterns_skip_implementation : string * Yojson.Basic.t
val patterns_skip_translation : string * Yojson.Basic.t
val pp_version : Stdlib.Format.formatter -> unit -> unit
val property_attributes : string
val relative_path_backtrack : int
val report : bool
val report_custom_error : bool
val report_force_relative_path : bool
val report_nullable_inconsistency : bool
val save_compact_summaries : bool
val smt_output : bool
val source_file_extentions : string list
val sourcepath : string option
val sources : string list
val specs_files_suffix : string
val trace_absarray : bool
val unsafe_unret : string
val incremental_analysis : bool
val weak : string
val whitelisted_cpp_classes : string list
val whitelisted_cpp_methods : string list
val wrappers_dir : string
val abs_struct : int
val abs_val : int
val allow_leak : bool
val annotation_reachability_cxx : Yojson.Basic.t
val annotation_reachability_cxx_sources : Yojson.Basic.t
val annotation_reachability_custom_pairs : Yojson.Basic.t
val anon_args : string list
val array_level : int
val biabduction_models_mode : bool
val bo_debug : int
val bo_field_depth_limit : int option
val bo_service_handler_request : bool
val bootclasspath : string option
val buck : bool
val buck_blacklist : string list
val buck_build_args : string list
val buck_build_args_no_inline : string list
val buck_cache_mode : bool
val buck_merge_all_deps : bool
val buck_mode : BuckMode.t option
val buck_out_gen : string
val buck_targets_blacklist : string list
val call_graph_schedule : bool
val capture : bool
val capture_blacklist : string option
val censor_report : ((bool * Str.regexp) * (bool * Str.regexp) * string) list
val changed_files_index : string option
val check_version : string option
val clang_biniou_file : string option
val clang_compound_literal_init_limit : int
val clang_extra_flags : string list
val clang_blacklisted_flags : string list
val clang_blacklisted_flags_with_arg : string list
val clang_ignore_regex : string option
val clang_isystem_to_override_regex : Str.regexp option
val clang_idirafter_to_override_regex : Str.regexp option
val clang_libcxx_include_to_override_regex : string option
val command : ATDGenerated.InferCommand.t
val compute_analytics : bool
val continue_analysis : bool
val continue_capture : bool
val costs_current : string option
val cost_issues_tests : string option
val costs_previous : string option
val cxx : bool
val cxx_scope_guards : Yojson.Basic.t
val deduplicate : bool
val debug_exceptions : bool
val debug_level_analysis : int
val debug_level_capture : int
val debug_level_linters : int
val debug_level_test_determinator : int
val debug_mode : bool
val default_linters : bool
val dependency_mode : bool
val developer_mode : bool
val differential_filter_files : string option
val differential_filter_set : [ `Introduced | `Fixed | `Preexisting ] list
val dotty_cfg_libs : bool
val dump_duplicate_symbols : bool
val eradicate_condition_redundant : bool
val eradicate_field_over_annotated : bool
val eradicate_return_over_annotated : bool
val eradicate_verbose : bool
val fail_on_bug : bool
val fcp_apple_clang : string option
val fcp_syntax_only : bool
val file_renamings : string option
val filter_paths : bool
val filtering : bool
val force_delete_results_dir : bool
val force_integration : build_system option
val from_json_report : string
val from_json_costs_report : string
val frontend_stats : bool
val frontend_tests : bool
val function_pointer_specialization : bool
val generated_classes : string option
val genrule_mode : bool
val get_linter_doc_url : linter_id:string -> string option
val help_checker : Checker.t list
val help_issue_type : IssueType.t list
val hoisting_report_only_expensive : bool
val html : bool
val icfg_dotty_outfile : string option
val infer_is_clang : bool
val infer_is_javac : bool
val implicit_sdk_root : string option
val inclusive_cost : bool
val inferconfig_file : string option
val inferconfig_dir : string option
val iphoneos_target_sdk_version : string option
val iphoneos_target_sdk_version_path_regex : iphoneos_target_sdk_version_path_regex list
val is_checker_enabled : Checker.t -> bool
val issues_tests : string option
val issues_tests_fields : IssuesTestField.t list
val iterations : int
val java_debug_source_file_info : string option
val java_jar_compiler : string option
val java_version : int option
val javac_classes_out : string
val job_id : string option
val jobs : int
val join_cond : int
val keep_going : bool
val linter : string option
val linters_def_file : string list
val linters_def_folder : string list
val linters_developer_mode : bool
val linters_ignore_clang_failures : bool
val linters_validate_syntax_only : bool
val list_checkers : bool
val list_issue_types : bool
val liveness_dangerous_classes : Yojson.Basic.t
val max_nesting : int option
val merge : bool
val method_decls_info : string option
val ml_buckets : [ `MLeak_all | `MLeak_arc | `MLeak_cf | `MLeak_cpp | `MLeak_no_arc | `MLeak_unknown ] list
val modified_lines : string option
val monitor_prop_size : bool
val nelseg : bool
val no_translate_libs : bool
val nullable_annotation : string option
val nullsafe_disable_field_not_initialized_in_nonstrict_classes : bool
val nullsafe_optimistic_third_party_params_in_non_strict : bool
val nullsafe_third_party_signatures : string option
val nullsafe_third_party_location_for_messaging_only : string option
val nullsafe_strict_containers : bool
val oom_threshold : int option
val only_cheap_debug : bool
val only_footprint : bool
val pmd_xml : bool
val print_active_checkers : bool
val print_builtins : bool
val print_logs : bool
val print_types : bool
val print_using_diff : bool
val procedures : bool
val procedures_attributes : bool
val procedures_definedness : bool
val procedures_filter : string option
val procedures_name : bool
val procedures_source_file : bool
val procedures_summary : bool
val process_clang_ast : bool
val clang_frontend_action_string : string
val profiler_samples : string option
val progress_bar : [ `MultiLine | `Plain | `Quiet ]
val project_root : string
val pudge : bool
val pulse_cut_to_one_path_procedures_pattern : Str.regexp option
val pulse_recency_limit : int
val pulse_intraprocedural_only : bool
val pulse_max_disjuncts : int
val pulse_model_abort : string list
val pulse_model_alloc_pattern : Str.regexp option
val pulse_model_release_pattern : Str.regexp option
val pulse_model_transfer_ownership_namespace : (string * string) list
val pulse_model_transfer_ownership : string list
val pulse_widen_threshold : int
val pure_by_default : bool
val quandary_endpoints : Yojson.Basic.t
val quandary_sanitizers : Yojson.Basic.t
val quandary_sinks : Yojson.Basic.t
val quandary_sources : Yojson.Basic.t
val quiet : bool
val racerd_guardedby : bool
val reactive_mode : bool
val reanalyze : bool
val report_blacklist_files_containing : string list
val report_console_limit : int option
val report_current : string option
val report_formatter : [ `No_formatter | `Phabricator_formatter ]
val report_path_regex_blacklist : string list
val report_path_regex_whitelist : string list
val report_previous : string option
val report_suppress_errors : string list
val reports_include_ml_loc : bool
val rest : string list
val results_dir : string
val scheduler : scheduler
val scuba_logging : bool
val scuba_normals : string IStdlib.IStd.String.Map.t
val scuba_tags : string list IStdlib.IStd.String.Map.t
val seconds_per_iteration : float option
val select : int option
val show_buckets : bool
val siof_check_iostreams : bool
val siof_safe_methods : string list
val skip_analysis_in_path : string list
val skip_analysis_in_path_skips_compilation : bool
val skip_duplicated_types : bool
val skip_translation_headers : string list
val sledge_timers : bool
val source_files : bool
val source_files_cfg : bool
val source_files_filter : string option
val source_files_freshly_captured : bool
val source_files_procedure_names : bool
val source_files_type_environment : bool
val source_preview : bool
val sqlite_cache_size : int
val sqlite_page_size : int
val sqlite_lock_timeout : int
val sqlite_vfs : string option
val sqlite_write_daemon : bool
val starvation_skip_analysis : Yojson.Basic.t
val starvation_strict_mode : bool
val starvation_whole_program : bool
val subtype_multirange : bool
val summaries_caches_max_size : int
val symops_per_iteration : int option
val test_determinator : bool
val export_changed_functions : bool
val test_filtering : bool
val testing_mode : bool
val threadsafe_aliases : Yojson.Basic.t
val topl_properties : string list
val trace_error : bool
val trace_events : bool
val trace_join : bool
val trace_ondemand : bool
val trace_rearrange : bool
val trace_topl : bool
val tv_commit : string option
val tv_limit : int
val tv_limit_filtered : int
val type_size : bool
val uninit_interproc : bool
val unsafe_malloc : bool
val worklist_mode : int
val write_dotty : bool
val write_html : bool
val write_html_whitelist_regex : string list
val write_website : string option
val xcode_developer_dir : string option
val xcpretty : bool
val dynamic_dispatch : bool
val toplevel_results_dir : string
In some integrations, eg Buck, infer subprocesses started by the build system (started by the toplevel infer process) will have their own results directory; this points to the results directory of the toplevel infer process, which can be useful for, eg, storing debug info. In other cases this is equal to results_dir
.
val is_in_custom_symbols : string -> string -> bool
Does named symbol match any prefix in the named custom symbol list?
val execution_id : IStdlib.IStd.Int64.t
val clang_compilation_dbs : [ `Escaped of string | `Raw of string ] list IStdlib.IStd.ref
IBase.Config
type os_type
=
| Unix |
| Win32 |
| Cygwin |
type build_system
=
| BAnt |
| BBuck |
| BClang |
| BGradle |
| BJava |
| BJavac |
| BMake |
| BMvn |
| BNdk |
| BXcode |
type scheduler
=
| File |
| Restart |
| SyntacticCallGraph |
val build_system_of_exe_name : string -> build_system
val string_of_build_system : build_system -> string
val env_inside_maven : IStdlib.IStd.Unix.env
val anonymous_block_num_sep : string
val anonymous_block_prefix : string
val append_buck_flavors : string list
val assign : string
val biabduction_models_dir : string
val biabduction_models_jar : string
val biabduction_models_src_dir : string
val bin_dir : string
val bound_error_allowed_in_procedure_call : bool
val clang_exe_aliases : string list
val clang_initializer_prefix : string
val clang_inner_destructor_prefix : string
val clang_plugin_path : string
val classpath : string option
val default_failure_name : string
val dotty_frontend_output : string
val etc_dir : string
val fail_on_issue_exit_code : int
val fcp_dir : string
val idempotent_getters : bool
val initial_analysis_time : float
val ivar_attributes : string
val java_lambda_marker_infix : string
marker to recognize methods generated by javalib to eliminate lambdas
val lib_dir : string
val load_average : float option
val max_narrows : int
val max_widens : int
val meet_level : int
val nsnotification_center_checker_backend : bool
val os_type : os_type
val passthroughs : bool
val patterns_modeled_expensive : string * Yojson.Basic.t
val patterns_never_returning_null : string * Yojson.Basic.t
val patterns_skip_implementation : string * Yojson.Basic.t
val patterns_skip_translation : string * Yojson.Basic.t
val pp_version : Stdlib.Format.formatter -> unit -> unit
val property_attributes : string
val relative_path_backtrack : int
val report : bool
val report_custom_error : bool
val report_force_relative_path : bool
val report_nullable_inconsistency : bool
val save_compact_summaries : bool
val smt_output : bool
val source_file_extentions : string list
val sourcepath : string option
val sources : string list
val specs_files_suffix : string
val trace_absarray : bool
val unsafe_unret : string
val incremental_analysis : bool
val weak : string
val whitelisted_cpp_classes : string list
val whitelisted_cpp_methods : string list
val wrappers_dir : string
val abs_struct : int
val abs_val : int
val allow_leak : bool
val annotation_reachability_cxx : Yojson.Basic.t
val annotation_reachability_cxx_sources : Yojson.Basic.t
val annotation_reachability_custom_pairs : Yojson.Basic.t
val anon_args : string list
val array_level : int
val biabduction_models_mode : bool
val bo_debug : int
val bo_field_depth_limit : int option
val bootclasspath : string option
val buck : bool
val buck_blacklist : string list
val buck_build_args : string list
val buck_build_args_no_inline : string list
val buck_cache_mode : bool
val buck_merge_all_deps : bool
val buck_mode : BuckMode.t option
val buck_out_gen : string
val buck_targets_blacklist : string list
val call_graph_schedule : bool
val capture : bool
val capture_blacklist : string option
val censor_report : ((bool * Str.regexp) * (bool * Str.regexp) * string) list
val changed_files_index : string option
val check_version : string option
val clang_biniou_file : string option
val clang_compound_literal_init_limit : int
val clang_extra_flags : string list
val clang_blacklisted_flags : string list
val clang_blacklisted_flags_with_arg : string list
val clang_ignore_regex : string option
val clang_isystem_to_override_regex : Str.regexp option
val clang_idirafter_to_override_regex : Str.regexp option
val clang_libcxx_include_to_override_regex : string option
val command : ATDGenerated.InferCommand.t
val compute_analytics : bool
val continue_analysis : bool
val continue_capture : bool
val costs_current : string option
val cost_issues_tests : string option
val costs_previous : string option
val cxx : bool
val cxx_scope_guards : Yojson.Basic.t
val deduplicate : bool
val debug_exceptions : bool
val debug_level_analysis : int
val debug_level_capture : int
val debug_level_linters : int
val debug_level_test_determinator : int
val debug_mode : bool
val default_linters : bool
val dependency_mode : bool
val developer_mode : bool
val differential_filter_files : string option
val differential_filter_set : [ `Introduced | `Fixed | `Preexisting ] list
val dotty_cfg_libs : bool
val dump_duplicate_symbols : bool
val eradicate_condition_redundant : bool
val eradicate_field_over_annotated : bool
val eradicate_return_over_annotated : bool
val eradicate_verbose : bool
val fail_on_bug : bool
val fcp_apple_clang : string option
val fcp_syntax_only : bool
val file_renamings : string option
val filter_paths : bool
val filtering : bool
val force_delete_results_dir : bool
val force_integration : build_system option
val from_json_report : string
val from_json_costs_report : string
val frontend_stats : bool
val frontend_tests : bool
val function_pointer_specialization : bool
val generated_classes : string option
val genrule_mode : bool
val get_linter_doc_url : linter_id:string -> string option
val help_checker : Checker.t list
val help_issue_type : IssueType.t list
val hoisting_report_only_expensive : bool
val html : bool
val icfg_dotty_outfile : string option
val infer_is_clang : bool
val infer_is_javac : bool
val implicit_sdk_root : string option
val inclusive_cost : bool
val inferconfig_file : string option
val inferconfig_dir : string option
val iphoneos_target_sdk_version : string option
val iphoneos_target_sdk_version_path_regex : iphoneos_target_sdk_version_path_regex list
val is_checker_enabled : Checker.t -> bool
val issues_tests : string option
val issues_tests_fields : IssuesTestField.t list
val iterations : int
val java_debug_source_file_info : string option
val java_jar_compiler : string option
val java_version : int option
val javac_classes_out : string
val job_id : string option
val jobs : int
val join_cond : int
val keep_going : bool
val linter : string option
val linters_def_file : string list
val linters_def_folder : string list
val linters_developer_mode : bool
val linters_ignore_clang_failures : bool
val linters_validate_syntax_only : bool
val list_checkers : bool
val list_issue_types : bool
val liveness_dangerous_classes : Yojson.Basic.t
val max_nesting : int option
val merge : bool
val method_decls_info : string option
val ml_buckets : [ `MLeak_all | `MLeak_arc | `MLeak_cf | `MLeak_cpp | `MLeak_no_arc | `MLeak_unknown ] list
val modified_lines : string option
val monitor_prop_size : bool
val nelseg : bool
val no_translate_libs : bool
val nullable_annotation : string option
val nullsafe_disable_field_not_initialized_in_nonstrict_classes : bool
val nullsafe_optimistic_third_party_params_in_non_strict : bool
val nullsafe_third_party_signatures : string option
val nullsafe_third_party_location_for_messaging_only : string option
val nullsafe_strict_containers : bool
val oom_threshold : int option
val only_cheap_debug : bool
val only_footprint : bool
val pmd_xml : bool
val print_active_checkers : bool
val print_builtins : bool
val print_logs : bool
val print_types : bool
val print_using_diff : bool
val procedures : bool
val procedures_attributes : bool
val procedures_definedness : bool
val procedures_filter : string option
val procedures_name : bool
val procedures_source_file : bool
val procedures_summary : bool
val process_clang_ast : bool
val clang_frontend_action_string : string
val profiler_samples : string option
val progress_bar : [ `MultiLine | `Plain | `Quiet ]
val project_root : string
val pudge : bool
val pulse_cut_to_one_path_procedures_pattern : Str.regexp option
val pulse_recency_limit : int
val pulse_intraprocedural_only : bool
val pulse_max_disjuncts : int
val pulse_model_abort : string list
val pulse_model_alloc_pattern : Str.regexp option
val pulse_model_release_pattern : Str.regexp option
val pulse_model_transfer_ownership_namespace : (string * string) list
val pulse_model_transfer_ownership : string list
val pulse_widen_threshold : int
val pure_by_default : bool
val quandary_endpoints : Yojson.Basic.t
val quandary_sanitizers : Yojson.Basic.t
val quandary_sinks : Yojson.Basic.t
val quandary_sources : Yojson.Basic.t
val quiet : bool
val racerd_guardedby : bool
val reactive_mode : bool
val reanalyze : bool
val report_blacklist_files_containing : string list
val report_console_limit : int option
val report_current : string option
val report_formatter : [ `No_formatter | `Phabricator_formatter ]
val report_path_regex_blacklist : string list
val report_path_regex_whitelist : string list
val report_previous : string option
val report_suppress_errors : string list
val reports_include_ml_loc : bool
val rest : string list
val results_dir : string
val scheduler : scheduler
val scuba_logging : bool
val scuba_normals : string IStdlib.IStd.String.Map.t
val scuba_tags : string list IStdlib.IStd.String.Map.t
val seconds_per_iteration : float option
val select : int option
val show_buckets : bool
val siof_check_iostreams : bool
val siof_safe_methods : string list
val skip_analysis_in_path : string list
val skip_analysis_in_path_skips_compilation : bool
val skip_duplicated_types : bool
val skip_translation_headers : string list
val sledge_timers : bool
val source_files : bool
val source_files_cfg : bool
val source_files_filter : string option
val source_files_freshly_captured : bool
val source_files_procedure_names : bool
val source_files_type_environment : bool
val source_preview : bool
val sqlite_cache_size : int
val sqlite_page_size : int
val sqlite_lock_timeout : int
val sqlite_vfs : string option
val sqlite_write_daemon : bool
val starvation_skip_analysis : Yojson.Basic.t
val starvation_strict_mode : bool
val starvation_whole_program : bool
val subtype_multirange : bool
val summaries_caches_max_size : int
val symops_per_iteration : int option
val test_determinator : bool
val export_changed_functions : bool
val test_filtering : bool
val testing_mode : bool
val threadsafe_aliases : Yojson.Basic.t
val topl_properties : string list
val trace_error : bool
val trace_events : bool
val trace_join : bool
val trace_ondemand : bool
val trace_rearrange : bool
val trace_topl : bool
val tv_commit : string option
val tv_limit : int
val tv_limit_filtered : int
val type_size : bool
val uninit_interproc : bool
val unsafe_malloc : bool
val worklist_mode : int
val write_dotty : bool
val write_html : bool
val write_html_whitelist_regex : string list
val write_website : string option
val xcode_developer_dir : string option
val xcpretty : bool
val dynamic_dispatch : bool
val toplevel_results_dir : string
In some integrations, eg Buck, infer subprocesses started by the build system (started by the toplevel infer process) will have their own results directory; this points to the results directory of the toplevel infer process, which can be useful for, eg, storing debug info. In other cases this is equal to results_dir
.
val is_in_custom_symbols : string -> string -> bool
Does named symbol match any prefix in the named custom symbol list?
val execution_id : IStdlib.IStd.Int64.t
val clang_compilation_dbs : [ `Escaped of string | `Raw of string ] list IStdlib.IStd.ref
IBase.IssueType
type visibility
=
| User | always add to error log |
| Developer | only add to error log in some debug modes |
| Silent | never add to error log |
visibility of the issue type
val compare_visibility : visibility -> visibility -> int
val equal_visibility : visibility -> visibility -> bool
val string_of_visibility : visibility -> string
val string_of_severity : severity -> string
type t
= private
{
unique_id : string; | |
checker : Checker.t; | |
visibility : visibility; | |
user_documentation : string option; | |
mutable default_severity : severity; | used for documentation but can be overriden at report time |
mutable enabled : bool; | |
mutable hum : string; | |
mutable doc_url : string option; | |
mutable linters_def_file : string option; |
}
val pp : Stdlib.Format.formatter -> t -> unit
pretty print a localised string
val find_from_string : id:string -> t option
return the issue type if it was previously registered
val register_from_string : ?enabled:bool -> ?is_cost_issue:bool -> ?hum:string -> ?doc_url:string -> ?linters_def_file:string -> id:string -> ?visibility:visibility -> ?user_documentation:string -> severity -> Checker.t -> t
Create a new issue and register it in the list of all issues. NOTE: if the issue with the same string id is already registered, overrides `hum`, `doc_url`, and `linters_def_file`, but DOES NOT override `enabled`. This trick allows to deal with disabling/enabling dynamic AL issues from the config, when we don't know all params yet. Thus, the human-readable description can be updated when we encounter the definition of the issue type, eg in AL.
val checker_can_report : Checker.t -> t -> bool
Whether the issue was registered as coming from the given checker. Important to call this before reporting to keep documentation accurate.
val set_enabled : t -> bool -> unit
val abduction_case_not_implemented : t
val array_of_pointsto : t
val array_out_of_bounds_l1 : t
val array_out_of_bounds_l2 : t
val array_out_of_bounds_l3 : t
val assert_failure : t
val bad_footprint : t
val biabduction_analysis_stops : t
val buffer_overrun_l1 : t
val buffer_overrun_l2 : t
val buffer_overrun_l3 : t
val buffer_overrun_l4 : t
val buffer_overrun_l5 : t
val buffer_overrun_r2 : t
val buffer_overrun_s2 : t
val buffer_overrun_t1 : t
Tainted values is used in array accesses, causing buffer over/underruns
val buffer_overrun_u5 : t
val cannot_star : t
val captured_strong_self : t
val checkers_allocates_memory : t
Warning name when a performance critical method directly or indirectly calls a method allocating memory
val checkers_annotation_reachability_error : t
val checkers_calls_expensive_method : t
Warning name when a performance critical method directly or indirectly calls a method annotatd as expensive
val checkers_expensive_overrides_unexpensive : t
Warning name for the subtyping rule: method not annotated as expensive cannot be overridden by a method annotated as expensive
val checkers_fragment_retain_view : t
val checkers_immutable_cast : t
val checkers_printf_args : t
val class_cast_exception : t
val complexity_increase : kind:CostKind.t -> is_on_ui_thread:bool -> t
val component_factory_function : t
val component_file_cyclomatic_complexity : t
val component_file_line_count : t
val component_initializer_with_side_effects : t
val component_with_multiple_factory_methods : t
val component_with_unconventional_superclass : t
val condition_always_false : t
val condition_always_true : t
val config_checks_between_markers : t
val constant_address_dereference : t
val create_intent_from_uri : t
val cross_site_scripting : t
val dangling_pointer_dereference : t
val dangling_pointer_dereference_maybe : t
val dead_store : t
val deadlock : t
val divide_by_zero : t
val do_not_report : t
an issue type that should never be reported
val empty_vector_access : t
val eradicate_condition_redundant : t
val eradicate_field_not_initialized : t
val eradicate_field_not_nullable : t
val eradicate_field_over_annotated : t
val eradicate_inconsistent_subclass_parameter_annotation : t
val eradicate_inconsistent_subclass_return_annotation : t
val eradicate_redundant_nested_class_annotation : t
val eradicate_bad_nested_class_annotation : t
val eradicate_nullable_dereference : t
val eradicate_parameter_not_nullable : t
val eradicate_return_not_nullable : t
val eradicate_return_over_annotated : t
val eradicate_unvetted_third_party_in_nullsafe : t
val eradicate_unchecked_usage_in_nullsafe : t
val eradicate_meta_class_can_be_nullsafe : t
val eradicate_meta_class_needs_improvement : t
val eradicate_meta_class_is_nullsafe : t
val exposed_insecure_intent_handling : t
val failure_exe : t
val field_not_null_checked : t
val guardedby_violation_racerd : t
val impure_function : t
val inefficient_keyset_iterator : t
val inferbo_alloc_is_big : t
val inferbo_alloc_is_negative : t
val inferbo_alloc_is_zero : t
val inferbo_alloc_may_be_big : t
val inferbo_alloc_may_be_negative : t
val inferbo_alloc_may_be_tainted : t
val infinite_cost_call : kind:CostKind.t -> t
val inherently_dangerous_function : t
val insecure_intent_handling : t
val integer_overflow_l1 : t
val integer_overflow_l2 : t
val integer_overflow_l5 : t
val integer_overflow_r2 : t
val integer_overflow_u5 : t
val interface_not_thread_safe : t
val internal_error : t
val invariant_call : t
val javascript_injection : t
val lab_resource_leak : t
val leak_after_array_abstraction : t
val leak_in_footprint : t
val leak_unknown_origin : t
val lockless_violation : t
val lock_consistency_violation : t
val logging_private_data : t
val expensive_loop_invariant_call : t
val memory_leak : t
val missing_fld : t
val missing_required_prop : t
val mixed_self_weakself : t
val multiple_weakself : t
val mutable_local_variable_in_component_file : t
val null_dereference : t
val nullptr_dereference : t
val parameter_not_null_checked : t
val pointer_size_mismatch : t
val precondition_not_found : t
val precondition_not_met : t
val premature_nil_termination : t
val pulse_memory_leak : t
val pure_function : t
val quandary_taint_error : t
val resource_leak : t
val retain_cycle : t
val skip_function : t
val skip_pointer_dereference : t
val shell_injection : t
val shell_injection_risk : t
val sql_injection : t
val sql_injection_risk : t
val stack_variable_address_escape : t
val starvation : t
val static_initialization_order_fiasco : t
val strict_mode_violation : t
val strong_self_not_checked : t
val symexec_memory_error : t
val thread_safety_violation : t
val topl_error : t
val unary_minus_applied_to_unsigned_expression : t
val uninitialized_value : t
val unreachable_code_after : t
val use_after_delete : t
val use_after_free : t
val use_after_lifetime : t
val untrusted_buffer_access : t
val untrusted_deserialization : t
val untrusted_deserialization_risk : t
val untrusted_file : t
val untrusted_file_risk : t
val untrusted_heap_allocation : t
val untrusted_intent_creation : t
val untrusted_url_risk : t
val untrusted_environment_change_risk : t
val untrusted_variable_length_array : t
val user_controlled_sql_risk : t
val vector_invalidation : t
val weak_self_in_noescape_block : t
val wrong_argument_number : t
val unreachable_cost_call : kind:CostKind.t -> t
IBase.IssueType
type visibility
=
| User | always add to error log |
| Developer | only add to error log in some debug modes |
| Silent | never add to error log |
visibility of the issue type
val compare_visibility : visibility -> visibility -> int
val equal_visibility : visibility -> visibility -> bool
val string_of_visibility : visibility -> string
val string_of_severity : severity -> string
type t
= private
{
unique_id : string; | |
checker : Checker.t; | |
visibility : visibility; | |
user_documentation : string option; | |
mutable default_severity : severity; | used for documentation but can be overriden at report time |
mutable enabled : bool; | |
mutable hum : string; | |
mutable doc_url : string option; | |
mutable linters_def_file : string option; |
}
val pp : Stdlib.Format.formatter -> t -> unit
pretty print a localised string
val find_from_string : id:string -> t option
return the issue type if it was previously registered
val register_dynamic : ?enabled:bool -> ?hum:string -> ?doc_url:string -> linters_def_file:string option -> id:string -> ?user_documentation:string -> severity -> Checker.t -> t
Create a new issue and register it in the list of all issues. NOTE: if the issue with the same string id is already registered, overrides `hum`, `doc_url`, and `linters_def_file`, but DOES NOT override `enabled`. This trick allows to deal with disabling/enabling dynamic AL issues from the config, when we don't know all params yet. Thus, the human-readable description can be updated when we encounter the definition of the issue type, eg in AL.
val checker_can_report : Checker.t -> t -> bool
Whether the issue was registered as coming from the given checker. Important to call this before reporting to keep documentation accurate.
val set_enabled : t -> bool -> unit
val abduction_case_not_implemented : t
val array_of_pointsto : t
val array_out_of_bounds_l1 : t
val array_out_of_bounds_l2 : t
val array_out_of_bounds_l3 : t
val assert_failure : t
val bad_footprint : t
val biabduction_analysis_stops : t
val buffer_overrun_l1 : t
val buffer_overrun_l2 : t
val buffer_overrun_l3 : t
val buffer_overrun_l4 : t
val buffer_overrun_l5 : t
val buffer_overrun_s2 : t
val buffer_overrun_u5 : t
val cannot_star : t
val captured_strong_self : t
val checkers_allocates_memory : t
Warning name when a performance critical method directly or indirectly calls a method allocating memory
val checkers_annotation_reachability_error : t
val checkers_calls_expensive_method : t
Warning name when a performance critical method directly or indirectly calls a method annotatd as expensive
val checkers_expensive_overrides_unexpensive : t
Warning name for the subtyping rule: method not annotated as expensive cannot be overridden by a method annotated as expensive
val checkers_fragment_retain_view : t
val checkers_immutable_cast : t
val checkers_printf_args : t
val class_cast_exception : t
val complexity_increase : kind:CostKind.t -> is_on_ui_thread:bool -> t
val component_factory_function : t
val component_file_cyclomatic_complexity : t
val component_file_line_count : t
val component_initializer_with_side_effects : t
val component_with_multiple_factory_methods : t
val component_with_unconventional_superclass : t
val condition_always_false : t
val condition_always_true : t
val config_checks_between_markers : t
val constant_address_dereference : t
val create_intent_from_uri : t
val cross_site_scripting : t
val dangling_pointer_dereference : t
val dangling_pointer_dereference_maybe : t
val dead_store : t
val deadlock : t
val divide_by_zero : t
val do_not_report : t
an issue type that should never be reported
val empty_vector_access : t
val eradicate_condition_redundant : t
val eradicate_field_not_initialized : t
val eradicate_field_not_nullable : t
val eradicate_field_over_annotated : t
val eradicate_inconsistent_subclass_parameter_annotation : t
val eradicate_inconsistent_subclass_return_annotation : t
val eradicate_redundant_nested_class_annotation : t
val eradicate_bad_nested_class_annotation : t
val eradicate_nullable_dereference : t
val eradicate_parameter_not_nullable : t
val eradicate_return_not_nullable : t
val eradicate_return_over_annotated : t
val eradicate_unvetted_third_party_in_nullsafe : t
val eradicate_unchecked_usage_in_nullsafe : t
val eradicate_meta_class_can_be_nullsafe : t
val eradicate_meta_class_needs_improvement : t
val eradicate_meta_class_is_nullsafe : t
val exposed_insecure_intent_handling : t
val failure_exe : t
val field_not_null_checked : t
val guardedby_violation_racerd : t
val impure_function : t
val inefficient_keyset_iterator : t
val inferbo_alloc_is_big : t
val inferbo_alloc_is_negative : t
val inferbo_alloc_is_zero : t
val inferbo_alloc_may_be_big : t
val inferbo_alloc_may_be_negative : t
val infinite_cost_call : kind:CostKind.t -> t
val inherently_dangerous_function : t
val insecure_intent_handling : t
val integer_overflow_l1 : t
val integer_overflow_l2 : t
val integer_overflow_l5 : t
val integer_overflow_u5 : t
val interface_not_thread_safe : t
val internal_error : t
val invariant_call : t
val javascript_injection : t
val lab_resource_leak : t
val leak_after_array_abstraction : t
val leak_in_footprint : t
val leak_unknown_origin : t
val lockless_violation : t
val lock_consistency_violation : t
val logging_private_data : t
val expensive_loop_invariant_call : t
val memory_leak : t
val missing_fld : t
val missing_required_prop : t
val mixed_self_weakself : t
val multiple_weakself : t
val mutable_local_variable_in_component_file : t
val null_dereference : t
val nullptr_dereference : t
val parameter_not_null_checked : t
val pointer_size_mismatch : t
val precondition_not_found : t
val precondition_not_met : t
val premature_nil_termination : t
val pulse_memory_leak : t
val pure_function : t
val quandary_taint_error : t
val resource_leak : t
val retain_cycle : t
val skip_function : t
val skip_pointer_dereference : t
val shell_injection : t
val shell_injection_risk : t
val sql_injection : t
val sql_injection_risk : t
val stack_variable_address_escape : t
val starvation : t
val static_initialization_order_fiasco : t
val strict_mode_violation : t
val strong_self_not_checked : t
val symexec_memory_error : t
val thread_safety_violation : t
val topl_error : t
val unary_minus_applied_to_unsigned_expression : t
val uninitialized_value : t
val unreachable_code_after : t
val use_after_delete : t
val use_after_free : t
val use_after_lifetime : t
val untrusted_buffer_access : t
val untrusted_deserialization : t
val untrusted_deserialization_risk : t
val untrusted_file : t
val untrusted_file_risk : t
val untrusted_heap_allocation : t
val untrusted_intent_creation : t
val untrusted_url_risk : t
val untrusted_environment_change_risk : t
val untrusted_variable_length_array : t
val user_controlled_sql_risk : t
val vector_invalidation : t
val weak_self_in_noescape_block : t
val wrong_argument_number : t
val unreachable_cost_call : kind:CostKind.t -> t
IBase__Config
type os_type
=
| Unix |
| Win32 |
| Cygwin |
type build_system
=
| BAnt |
| BBuck |
| BClang |
| BGradle |
| BJava |
| BJavac |
| BMake |
| BMvn |
| BNdk |
| BXcode |
type scheduler
=
| File |
| Restart |
| SyntacticCallGraph |
val build_system_of_exe_name : string -> build_system
val string_of_build_system : build_system -> string
val env_inside_maven : IStdlib.IStd.Unix.env
val anonymous_block_num_sep : string
val anonymous_block_prefix : string
val append_buck_flavors : string list
val assign : string
val biabduction_models_dir : string
val biabduction_models_jar : string
val biabduction_models_src_dir : string
val bin_dir : string
val bound_error_allowed_in_procedure_call : bool
val clang_exe_aliases : string list
val clang_initializer_prefix : string
val clang_inner_destructor_prefix : string
val clang_plugin_path : string
val classpath : string option
val default_failure_name : string
val dotty_frontend_output : string
val etc_dir : string
val fail_on_issue_exit_code : int
val fcp_dir : string
val idempotent_getters : bool
val initial_analysis_time : float
val ivar_attributes : string
val java_lambda_marker_infix : string
marker to recognize methods generated by javalib to eliminate lambdas
val lib_dir : string
val load_average : float option
val max_narrows : int
val max_widens : int
val meet_level : int
val nsnotification_center_checker_backend : bool
val os_type : os_type
val passthroughs : bool
val patterns_modeled_expensive : string * Yojson.Basic.t
val patterns_never_returning_null : string * Yojson.Basic.t
val patterns_skip_implementation : string * Yojson.Basic.t
val patterns_skip_translation : string * Yojson.Basic.t
val pp_version : Stdlib.Format.formatter -> unit -> unit
val property_attributes : string
val relative_path_backtrack : int
val report : bool
val report_custom_error : bool
val report_force_relative_path : bool
val report_nullable_inconsistency : bool
val save_compact_summaries : bool
val smt_output : bool
val source_file_extentions : string list
val sourcepath : string option
val sources : string list
val specs_files_suffix : string
val trace_absarray : bool
val unsafe_unret : string
val incremental_analysis : bool
val weak : string
val whitelisted_cpp_classes : string list
val whitelisted_cpp_methods : string list
val wrappers_dir : string
val abs_struct : int
val abs_val : int
val allow_leak : bool
val annotation_reachability_cxx : Yojson.Basic.t
val annotation_reachability_cxx_sources : Yojson.Basic.t
val annotation_reachability_custom_pairs : Yojson.Basic.t
val anon_args : string list
val array_level : int
val biabduction_models_mode : bool
val bo_debug : int
val bo_field_depth_limit : int option
val bo_service_handler_request : bool
val bootclasspath : string option
val buck : bool
val buck_blacklist : string list
val buck_build_args : string list
val buck_build_args_no_inline : string list
val buck_cache_mode : bool
val buck_merge_all_deps : bool
val buck_mode : IBase.BuckMode.t option
val buck_out_gen : string
val buck_targets_blacklist : string list
val call_graph_schedule : bool
val capture : bool
val capture_blacklist : string option
val censor_report : ((bool * Str.regexp) * (bool * Str.regexp) * string) list
val changed_files_index : string option
val check_version : string option
val clang_biniou_file : string option
val clang_compound_literal_init_limit : int
val clang_extra_flags : string list
val clang_blacklisted_flags : string list
val clang_blacklisted_flags_with_arg : string list
val clang_ignore_regex : string option
val clang_isystem_to_override_regex : Str.regexp option
val clang_idirafter_to_override_regex : Str.regexp option
val clang_libcxx_include_to_override_regex : string option
val command : ATDGenerated.InferCommand.t
val compute_analytics : bool
val continue_analysis : bool
val continue_capture : bool
val costs_current : string option
val cost_issues_tests : string option
val costs_previous : string option
val cxx : bool
val cxx_scope_guards : Yojson.Basic.t
val deduplicate : bool
val debug_exceptions : bool
val debug_level_analysis : int
val debug_level_capture : int
val debug_level_linters : int
val debug_level_test_determinator : int
val debug_mode : bool
val default_linters : bool
val dependency_mode : bool
val developer_mode : bool
val differential_filter_files : string option
val differential_filter_set : [ `Introduced | `Fixed | `Preexisting ] list
val dotty_cfg_libs : bool
val dump_duplicate_symbols : bool
val eradicate_condition_redundant : bool
val eradicate_field_over_annotated : bool
val eradicate_return_over_annotated : bool
val eradicate_verbose : bool
val fail_on_bug : bool
val fcp_apple_clang : string option
val fcp_syntax_only : bool
val file_renamings : string option
val filter_paths : bool
val filtering : bool
val force_delete_results_dir : bool
val force_integration : build_system option
val from_json_report : string
val from_json_costs_report : string
val frontend_stats : bool
val frontend_tests : bool
val function_pointer_specialization : bool
val generated_classes : string option
val genrule_mode : bool
val get_linter_doc_url : linter_id:string -> string option
val help_checker : IBase.Checker.t list
val help_issue_type : IBase.IssueType.t list
val hoisting_report_only_expensive : bool
val html : bool
val icfg_dotty_outfile : string option
val infer_is_clang : bool
val infer_is_javac : bool
val implicit_sdk_root : string option
val inclusive_cost : bool
val inferconfig_file : string option
val inferconfig_dir : string option
val iphoneos_target_sdk_version : string option
val iphoneos_target_sdk_version_path_regex : iphoneos_target_sdk_version_path_regex list
val is_checker_enabled : IBase.Checker.t -> bool
val issues_tests : string option
val issues_tests_fields : IBase.IssuesTestField.t list
val iterations : int
val java_debug_source_file_info : string option
val java_jar_compiler : string option
val java_version : int option
val javac_classes_out : string
val job_id : string option
val jobs : int
val join_cond : int
val keep_going : bool
val linter : string option
val linters_def_file : string list
val linters_def_folder : string list
val linters_developer_mode : bool
val linters_ignore_clang_failures : bool
val linters_validate_syntax_only : bool
val list_checkers : bool
val list_issue_types : bool
val liveness_dangerous_classes : Yojson.Basic.t
val max_nesting : int option
val merge : bool
val method_decls_info : string option
val ml_buckets : [ `MLeak_all | `MLeak_arc | `MLeak_cf | `MLeak_cpp | `MLeak_no_arc | `MLeak_unknown ] list
val modified_lines : string option
val monitor_prop_size : bool
val nelseg : bool
val no_translate_libs : bool
val nullable_annotation : string option
val nullsafe_disable_field_not_initialized_in_nonstrict_classes : bool
val nullsafe_optimistic_third_party_params_in_non_strict : bool
val nullsafe_third_party_signatures : string option
val nullsafe_third_party_location_for_messaging_only : string option
val nullsafe_strict_containers : bool
val oom_threshold : int option
val only_cheap_debug : bool
val only_footprint : bool
val pmd_xml : bool
val print_active_checkers : bool
val print_builtins : bool
val print_logs : bool
val print_types : bool
val print_using_diff : bool
val procedures : bool
val procedures_attributes : bool
val procedures_definedness : bool
val procedures_filter : string option
val procedures_name : bool
val procedures_source_file : bool
val procedures_summary : bool
val process_clang_ast : bool
val clang_frontend_action_string : string
val profiler_samples : string option
val progress_bar : [ `MultiLine | `Plain | `Quiet ]
val project_root : string
val pudge : bool
val pulse_cut_to_one_path_procedures_pattern : Str.regexp option
val pulse_recency_limit : int
val pulse_intraprocedural_only : bool
val pulse_max_disjuncts : int
val pulse_model_abort : string list
val pulse_model_alloc_pattern : Str.regexp option
val pulse_model_release_pattern : Str.regexp option
val pulse_model_transfer_ownership_namespace : (string * string) list
val pulse_model_transfer_ownership : string list
val pulse_widen_threshold : int
val pure_by_default : bool
val quandary_endpoints : Yojson.Basic.t
val quandary_sanitizers : Yojson.Basic.t
val quandary_sinks : Yojson.Basic.t
val quandary_sources : Yojson.Basic.t
val quiet : bool
val racerd_guardedby : bool
val reactive_mode : bool
val reanalyze : bool
val report_blacklist_files_containing : string list
val report_console_limit : int option
val report_current : string option
val report_formatter : [ `No_formatter | `Phabricator_formatter ]
val report_path_regex_blacklist : string list
val report_path_regex_whitelist : string list
val report_previous : string option
val report_suppress_errors : string list
val reports_include_ml_loc : bool
val rest : string list
val results_dir : string
val scheduler : scheduler
val scuba_logging : bool
val scuba_normals : string IStdlib.IStd.String.Map.t
val scuba_tags : string list IStdlib.IStd.String.Map.t
val seconds_per_iteration : float option
val select : int option
val show_buckets : bool
val siof_check_iostreams : bool
val siof_safe_methods : string list
val skip_analysis_in_path : string list
val skip_analysis_in_path_skips_compilation : bool
val skip_duplicated_types : bool
val skip_translation_headers : string list
val sledge_timers : bool
val source_files : bool
val source_files_cfg : bool
val source_files_filter : string option
val source_files_freshly_captured : bool
val source_files_procedure_names : bool
val source_files_type_environment : bool
val source_preview : bool
val sqlite_cache_size : int
val sqlite_page_size : int
val sqlite_lock_timeout : int
val sqlite_vfs : string option
val sqlite_write_daemon : bool
val starvation_skip_analysis : Yojson.Basic.t
val starvation_strict_mode : bool
val starvation_whole_program : bool
val subtype_multirange : bool
val summaries_caches_max_size : int
val symops_per_iteration : int option
val test_determinator : bool
val export_changed_functions : bool
val test_filtering : bool
val testing_mode : bool
val threadsafe_aliases : Yojson.Basic.t
val topl_properties : string list
val trace_error : bool
val trace_events : bool
val trace_join : bool
val trace_ondemand : bool
val trace_rearrange : bool
val trace_topl : bool
val tv_commit : string option
val tv_limit : int
val tv_limit_filtered : int
val type_size : bool
val uninit_interproc : bool
val unsafe_malloc : bool
val worklist_mode : int
val write_dotty : bool
val write_html : bool
val write_html_whitelist_regex : string list
val write_website : string option
val xcode_developer_dir : string option
val xcpretty : bool
val dynamic_dispatch : bool
val toplevel_results_dir : string
In some integrations, eg Buck, infer subprocesses started by the build system (started by the toplevel infer process) will have their own results directory; this points to the results directory of the toplevel infer process, which can be useful for, eg, storing debug info. In other cases this is equal to results_dir
.
val is_in_custom_symbols : string -> string -> bool
Does named symbol match any prefix in the named custom symbol list?
val execution_id : IStdlib.IStd.Int64.t
val clang_compilation_dbs : [ `Escaped of string | `Raw of string ] list IStdlib.IStd.ref
IBase__Config
type os_type
=
| Unix |
| Win32 |
| Cygwin |
type build_system
=
| BAnt |
| BBuck |
| BClang |
| BGradle |
| BJava |
| BJavac |
| BMake |
| BMvn |
| BNdk |
| BXcode |
type scheduler
=
| File |
| Restart |
| SyntacticCallGraph |
val build_system_of_exe_name : string -> build_system
val string_of_build_system : build_system -> string
val env_inside_maven : IStdlib.IStd.Unix.env
val anonymous_block_num_sep : string
val anonymous_block_prefix : string
val append_buck_flavors : string list
val assign : string
val biabduction_models_dir : string
val biabduction_models_jar : string
val biabduction_models_src_dir : string
val bin_dir : string
val bound_error_allowed_in_procedure_call : bool
val clang_exe_aliases : string list
val clang_initializer_prefix : string
val clang_inner_destructor_prefix : string
val clang_plugin_path : string
val classpath : string option
val default_failure_name : string
val dotty_frontend_output : string
val etc_dir : string
val fail_on_issue_exit_code : int
val fcp_dir : string
val idempotent_getters : bool
val initial_analysis_time : float
val ivar_attributes : string
val java_lambda_marker_infix : string
marker to recognize methods generated by javalib to eliminate lambdas
val lib_dir : string
val load_average : float option
val max_narrows : int
val max_widens : int
val meet_level : int
val nsnotification_center_checker_backend : bool
val os_type : os_type
val passthroughs : bool
val patterns_modeled_expensive : string * Yojson.Basic.t
val patterns_never_returning_null : string * Yojson.Basic.t
val patterns_skip_implementation : string * Yojson.Basic.t
val patterns_skip_translation : string * Yojson.Basic.t
val pp_version : Stdlib.Format.formatter -> unit -> unit
val property_attributes : string
val relative_path_backtrack : int
val report : bool
val report_custom_error : bool
val report_force_relative_path : bool
val report_nullable_inconsistency : bool
val save_compact_summaries : bool
val smt_output : bool
val source_file_extentions : string list
val sourcepath : string option
val sources : string list
val specs_files_suffix : string
val trace_absarray : bool
val unsafe_unret : string
val incremental_analysis : bool
val weak : string
val whitelisted_cpp_classes : string list
val whitelisted_cpp_methods : string list
val wrappers_dir : string
val abs_struct : int
val abs_val : int
val allow_leak : bool
val annotation_reachability_cxx : Yojson.Basic.t
val annotation_reachability_cxx_sources : Yojson.Basic.t
val annotation_reachability_custom_pairs : Yojson.Basic.t
val anon_args : string list
val array_level : int
val biabduction_models_mode : bool
val bo_debug : int
val bo_field_depth_limit : int option
val bootclasspath : string option
val buck : bool
val buck_blacklist : string list
val buck_build_args : string list
val buck_build_args_no_inline : string list
val buck_cache_mode : bool
val buck_merge_all_deps : bool
val buck_mode : IBase.BuckMode.t option
val buck_out_gen : string
val buck_targets_blacklist : string list
val call_graph_schedule : bool
val capture : bool
val capture_blacklist : string option
val censor_report : ((bool * Str.regexp) * (bool * Str.regexp) * string) list
val changed_files_index : string option
val check_version : string option
val clang_biniou_file : string option
val clang_compound_literal_init_limit : int
val clang_extra_flags : string list
val clang_blacklisted_flags : string list
val clang_blacklisted_flags_with_arg : string list
val clang_ignore_regex : string option
val clang_isystem_to_override_regex : Str.regexp option
val clang_idirafter_to_override_regex : Str.regexp option
val clang_libcxx_include_to_override_regex : string option
val command : ATDGenerated.InferCommand.t
val compute_analytics : bool
val continue_analysis : bool
val continue_capture : bool
val costs_current : string option
val cost_issues_tests : string option
val costs_previous : string option
val cxx : bool
val cxx_scope_guards : Yojson.Basic.t
val deduplicate : bool
val debug_exceptions : bool
val debug_level_analysis : int
val debug_level_capture : int
val debug_level_linters : int
val debug_level_test_determinator : int
val debug_mode : bool
val default_linters : bool
val dependency_mode : bool
val developer_mode : bool
val differential_filter_files : string option
val differential_filter_set : [ `Introduced | `Fixed | `Preexisting ] list
val dotty_cfg_libs : bool
val dump_duplicate_symbols : bool
val eradicate_condition_redundant : bool
val eradicate_field_over_annotated : bool
val eradicate_return_over_annotated : bool
val eradicate_verbose : bool
val fail_on_bug : bool
val fcp_apple_clang : string option
val fcp_syntax_only : bool
val file_renamings : string option
val filter_paths : bool
val filtering : bool
val force_delete_results_dir : bool
val force_integration : build_system option
val from_json_report : string
val from_json_costs_report : string
val frontend_stats : bool
val frontend_tests : bool
val function_pointer_specialization : bool
val generated_classes : string option
val genrule_mode : bool
val get_linter_doc_url : linter_id:string -> string option
val help_checker : IBase.Checker.t list
val help_issue_type : IBase.IssueType.t list
val hoisting_report_only_expensive : bool
val html : bool
val icfg_dotty_outfile : string option
val infer_is_clang : bool
val infer_is_javac : bool
val implicit_sdk_root : string option
val inclusive_cost : bool
val inferconfig_file : string option
val inferconfig_dir : string option
val iphoneos_target_sdk_version : string option
val iphoneos_target_sdk_version_path_regex : iphoneos_target_sdk_version_path_regex list
val is_checker_enabled : IBase.Checker.t -> bool
val issues_tests : string option
val issues_tests_fields : IBase.IssuesTestField.t list
val iterations : int
val java_debug_source_file_info : string option
val java_jar_compiler : string option
val java_version : int option
val javac_classes_out : string
val job_id : string option
val jobs : int
val join_cond : int
val keep_going : bool
val linter : string option
val linters_def_file : string list
val linters_def_folder : string list
val linters_developer_mode : bool
val linters_ignore_clang_failures : bool
val linters_validate_syntax_only : bool
val list_checkers : bool
val list_issue_types : bool
val liveness_dangerous_classes : Yojson.Basic.t
val max_nesting : int option
val merge : bool
val method_decls_info : string option
val ml_buckets : [ `MLeak_all | `MLeak_arc | `MLeak_cf | `MLeak_cpp | `MLeak_no_arc | `MLeak_unknown ] list
val modified_lines : string option
val monitor_prop_size : bool
val nelseg : bool
val no_translate_libs : bool
val nullable_annotation : string option
val nullsafe_disable_field_not_initialized_in_nonstrict_classes : bool
val nullsafe_optimistic_third_party_params_in_non_strict : bool
val nullsafe_third_party_signatures : string option
val nullsafe_third_party_location_for_messaging_only : string option
val nullsafe_strict_containers : bool
val oom_threshold : int option
val only_cheap_debug : bool
val only_footprint : bool
val pmd_xml : bool
val print_active_checkers : bool
val print_builtins : bool
val print_logs : bool
val print_types : bool
val print_using_diff : bool
val procedures : bool
val procedures_attributes : bool
val procedures_definedness : bool
val procedures_filter : string option
val procedures_name : bool
val procedures_source_file : bool
val procedures_summary : bool
val process_clang_ast : bool
val clang_frontend_action_string : string
val profiler_samples : string option
val progress_bar : [ `MultiLine | `Plain | `Quiet ]
val project_root : string
val pudge : bool
val pulse_cut_to_one_path_procedures_pattern : Str.regexp option
val pulse_recency_limit : int
val pulse_intraprocedural_only : bool
val pulse_max_disjuncts : int
val pulse_model_abort : string list
val pulse_model_alloc_pattern : Str.regexp option
val pulse_model_release_pattern : Str.regexp option
val pulse_model_transfer_ownership_namespace : (string * string) list
val pulse_model_transfer_ownership : string list
val pulse_widen_threshold : int
val pure_by_default : bool
val quandary_endpoints : Yojson.Basic.t
val quandary_sanitizers : Yojson.Basic.t
val quandary_sinks : Yojson.Basic.t
val quandary_sources : Yojson.Basic.t
val quiet : bool
val racerd_guardedby : bool
val reactive_mode : bool
val reanalyze : bool
val report_blacklist_files_containing : string list
val report_console_limit : int option
val report_current : string option
val report_formatter : [ `No_formatter | `Phabricator_formatter ]
val report_path_regex_blacklist : string list
val report_path_regex_whitelist : string list
val report_previous : string option
val report_suppress_errors : string list
val reports_include_ml_loc : bool
val rest : string list
val results_dir : string
val scheduler : scheduler
val scuba_logging : bool
val scuba_normals : string IStdlib.IStd.String.Map.t
val scuba_tags : string list IStdlib.IStd.String.Map.t
val seconds_per_iteration : float option
val select : int option
val show_buckets : bool
val siof_check_iostreams : bool
val siof_safe_methods : string list
val skip_analysis_in_path : string list
val skip_analysis_in_path_skips_compilation : bool
val skip_duplicated_types : bool
val skip_translation_headers : string list
val sledge_timers : bool
val source_files : bool
val source_files_cfg : bool
val source_files_filter : string option
val source_files_freshly_captured : bool
val source_files_procedure_names : bool
val source_files_type_environment : bool
val source_preview : bool
val sqlite_cache_size : int
val sqlite_page_size : int
val sqlite_lock_timeout : int
val sqlite_vfs : string option
val sqlite_write_daemon : bool
val starvation_skip_analysis : Yojson.Basic.t
val starvation_strict_mode : bool
val starvation_whole_program : bool
val subtype_multirange : bool
val summaries_caches_max_size : int
val symops_per_iteration : int option
val test_determinator : bool
val export_changed_functions : bool
val test_filtering : bool
val testing_mode : bool
val threadsafe_aliases : Yojson.Basic.t
val topl_properties : string list
val trace_error : bool
val trace_events : bool
val trace_join : bool
val trace_ondemand : bool
val trace_rearrange : bool
val trace_topl : bool
val tv_commit : string option
val tv_limit : int
val tv_limit_filtered : int
val type_size : bool
val uninit_interproc : bool
val unsafe_malloc : bool
val worklist_mode : int
val write_dotty : bool
val write_html : bool
val write_html_whitelist_regex : string list
val write_website : string option
val xcode_developer_dir : string option
val xcpretty : bool
val dynamic_dispatch : bool
val toplevel_results_dir : string
In some integrations, eg Buck, infer subprocesses started by the build system (started by the toplevel infer process) will have their own results directory; this points to the results directory of the toplevel infer process, which can be useful for, eg, storing debug info. In other cases this is equal to results_dir
.
val is_in_custom_symbols : string -> string -> bool
Does named symbol match any prefix in the named custom symbol list?
val execution_id : IStdlib.IStd.Int64.t
val clang_compilation_dbs : [ `Escaped of string | `Raw of string ] list IStdlib.IStd.ref
IBase__IssueType
type visibility
=
| User | always add to error log |
| Developer | only add to error log in some debug modes |
| Silent | never add to error log |
visibility of the issue type
val compare_visibility : visibility -> visibility -> int
val equal_visibility : visibility -> visibility -> bool
val string_of_visibility : visibility -> string
val string_of_severity : severity -> string
type t
= private
{
unique_id : string; | |
checker : IBase.Checker.t; | |
visibility : visibility; | |
user_documentation : string option; | |
mutable default_severity : severity; | used for documentation but can be overriden at report time |
mutable enabled : bool; | |
mutable hum : string; | |
mutable doc_url : string option; | |
mutable linters_def_file : string option; |
}
val pp : Stdlib.Format.formatter -> t -> unit
pretty print a localised string
val find_from_string : id:string -> t option
return the issue type if it was previously registered
val register_from_string : ?enabled:bool -> ?is_cost_issue:bool -> ?hum:string -> ?doc_url:string -> ?linters_def_file:string -> id:string -> ?visibility:visibility -> ?user_documentation:string -> severity -> IBase.Checker.t -> t
Create a new issue and register it in the list of all issues. NOTE: if the issue with the same string id is already registered, overrides `hum`, `doc_url`, and `linters_def_file`, but DOES NOT override `enabled`. This trick allows to deal with disabling/enabling dynamic AL issues from the config, when we don't know all params yet. Thus, the human-readable description can be updated when we encounter the definition of the issue type, eg in AL.
val checker_can_report : IBase.Checker.t -> t -> bool
Whether the issue was registered as coming from the given checker. Important to call this before reporting to keep documentation accurate.
val set_enabled : t -> bool -> unit
val abduction_case_not_implemented : t
val array_of_pointsto : t
val array_out_of_bounds_l1 : t
val array_out_of_bounds_l2 : t
val array_out_of_bounds_l3 : t
val assert_failure : t
val bad_footprint : t
val biabduction_analysis_stops : t
val buffer_overrun_l1 : t
val buffer_overrun_l2 : t
val buffer_overrun_l3 : t
val buffer_overrun_l4 : t
val buffer_overrun_l5 : t
val buffer_overrun_r2 : t
val buffer_overrun_s2 : t
val buffer_overrun_t1 : t
Tainted values is used in array accesses, causing buffer over/underruns
val buffer_overrun_u5 : t
val cannot_star : t
val captured_strong_self : t
val checkers_allocates_memory : t
Warning name when a performance critical method directly or indirectly calls a method allocating memory
val checkers_annotation_reachability_error : t
val checkers_calls_expensive_method : t
Warning name when a performance critical method directly or indirectly calls a method annotatd as expensive
val checkers_expensive_overrides_unexpensive : t
Warning name for the subtyping rule: method not annotated as expensive cannot be overridden by a method annotated as expensive
val checkers_fragment_retain_view : t
val checkers_immutable_cast : t
val checkers_printf_args : t
val class_cast_exception : t
val complexity_increase : kind:IBase.CostKind.t -> is_on_ui_thread:bool -> t
val component_factory_function : t
val component_file_cyclomatic_complexity : t
val component_file_line_count : t
val component_initializer_with_side_effects : t
val component_with_multiple_factory_methods : t
val component_with_unconventional_superclass : t
val condition_always_false : t
val condition_always_true : t
val config_checks_between_markers : t
val constant_address_dereference : t
val create_intent_from_uri : t
val cross_site_scripting : t
val dangling_pointer_dereference : t
val dangling_pointer_dereference_maybe : t
val dead_store : t
val deadlock : t
val divide_by_zero : t
val do_not_report : t
an issue type that should never be reported
val empty_vector_access : t
val eradicate_condition_redundant : t
val eradicate_field_not_initialized : t
val eradicate_field_not_nullable : t
val eradicate_field_over_annotated : t
val eradicate_inconsistent_subclass_parameter_annotation : t
val eradicate_inconsistent_subclass_return_annotation : t
val eradicate_redundant_nested_class_annotation : t
val eradicate_bad_nested_class_annotation : t
val eradicate_nullable_dereference : t
val eradicate_parameter_not_nullable : t
val eradicate_return_not_nullable : t
val eradicate_return_over_annotated : t
val eradicate_unvetted_third_party_in_nullsafe : t
val eradicate_unchecked_usage_in_nullsafe : t
val eradicate_meta_class_can_be_nullsafe : t
val eradicate_meta_class_needs_improvement : t
val eradicate_meta_class_is_nullsafe : t
val exposed_insecure_intent_handling : t
val failure_exe : t
val field_not_null_checked : t
val guardedby_violation_racerd : t
val impure_function : t
val inefficient_keyset_iterator : t
val inferbo_alloc_is_big : t
val inferbo_alloc_is_negative : t
val inferbo_alloc_is_zero : t
val inferbo_alloc_may_be_big : t
val inferbo_alloc_may_be_negative : t
val inferbo_alloc_may_be_tainted : t
val infinite_cost_call : kind:IBase.CostKind.t -> t
val inherently_dangerous_function : t
val insecure_intent_handling : t
val integer_overflow_l1 : t
val integer_overflow_l2 : t
val integer_overflow_l5 : t
val integer_overflow_r2 : t
val integer_overflow_u5 : t
val interface_not_thread_safe : t
val internal_error : t
val invariant_call : t
val javascript_injection : t
val lab_resource_leak : t
val leak_after_array_abstraction : t
val leak_in_footprint : t
val leak_unknown_origin : t
val lockless_violation : t
val lock_consistency_violation : t
val logging_private_data : t
val expensive_loop_invariant_call : t
val memory_leak : t
val missing_fld : t
val missing_required_prop : t
val mixed_self_weakself : t
val multiple_weakself : t
val mutable_local_variable_in_component_file : t
val null_dereference : t
val nullptr_dereference : t
val parameter_not_null_checked : t
val pointer_size_mismatch : t
val precondition_not_found : t
val precondition_not_met : t
val premature_nil_termination : t
val pulse_memory_leak : t
val pure_function : t
val quandary_taint_error : t
val resource_leak : t
val retain_cycle : t
val skip_function : t
val skip_pointer_dereference : t
val shell_injection : t
val shell_injection_risk : t
val sql_injection : t
val sql_injection_risk : t
val stack_variable_address_escape : t
val starvation : t
val static_initialization_order_fiasco : t
val strict_mode_violation : t
val strong_self_not_checked : t
val symexec_memory_error : t
val thread_safety_violation : t
val topl_error : t
val unary_minus_applied_to_unsigned_expression : t
val uninitialized_value : t
val unreachable_code_after : t
val use_after_delete : t
val use_after_free : t
val use_after_lifetime : t
val untrusted_buffer_access : t
val untrusted_deserialization : t
val untrusted_deserialization_risk : t
val untrusted_file : t
val untrusted_file_risk : t
val untrusted_heap_allocation : t
val untrusted_intent_creation : t
val untrusted_url_risk : t
val untrusted_environment_change_risk : t
val untrusted_variable_length_array : t
val user_controlled_sql_risk : t
val vector_invalidation : t
val weak_self_in_noescape_block : t
val wrong_argument_number : t
val unreachable_cost_call : kind:IBase.CostKind.t -> t
IBase__IssueType
type visibility
=
| User | always add to error log |
| Developer | only add to error log in some debug modes |
| Silent | never add to error log |
visibility of the issue type
val compare_visibility : visibility -> visibility -> int
val equal_visibility : visibility -> visibility -> bool
val string_of_visibility : visibility -> string
val string_of_severity : severity -> string
type t
= private
{
unique_id : string; | |
checker : IBase.Checker.t; | |
visibility : visibility; | |
user_documentation : string option; | |
mutable default_severity : severity; | used for documentation but can be overriden at report time |
mutable enabled : bool; | |
mutable hum : string; | |
mutable doc_url : string option; | |
mutable linters_def_file : string option; |
}
val pp : Stdlib.Format.formatter -> t -> unit
pretty print a localised string
val find_from_string : id:string -> t option
return the issue type if it was previously registered
val register_dynamic : ?enabled:bool -> ?hum:string -> ?doc_url:string -> linters_def_file:string option -> id:string -> ?user_documentation:string -> severity -> IBase.Checker.t -> t
Create a new issue and register it in the list of all issues. NOTE: if the issue with the same string id is already registered, overrides `hum`, `doc_url`, and `linters_def_file`, but DOES NOT override `enabled`. This trick allows to deal with disabling/enabling dynamic AL issues from the config, when we don't know all params yet. Thus, the human-readable description can be updated when we encounter the definition of the issue type, eg in AL.
val checker_can_report : IBase.Checker.t -> t -> bool
Whether the issue was registered as coming from the given checker. Important to call this before reporting to keep documentation accurate.
val set_enabled : t -> bool -> unit
val abduction_case_not_implemented : t
val array_of_pointsto : t
val array_out_of_bounds_l1 : t
val array_out_of_bounds_l2 : t
val array_out_of_bounds_l3 : t
val assert_failure : t
val bad_footprint : t
val biabduction_analysis_stops : t
val buffer_overrun_l1 : t
val buffer_overrun_l2 : t
val buffer_overrun_l3 : t
val buffer_overrun_l4 : t
val buffer_overrun_l5 : t
val buffer_overrun_s2 : t
val buffer_overrun_u5 : t
val cannot_star : t
val captured_strong_self : t
val checkers_allocates_memory : t
Warning name when a performance critical method directly or indirectly calls a method allocating memory
val checkers_annotation_reachability_error : t
val checkers_calls_expensive_method : t
Warning name when a performance critical method directly or indirectly calls a method annotatd as expensive
val checkers_expensive_overrides_unexpensive : t
Warning name for the subtyping rule: method not annotated as expensive cannot be overridden by a method annotated as expensive
val checkers_fragment_retain_view : t
val checkers_immutable_cast : t
val checkers_printf_args : t
val class_cast_exception : t
val complexity_increase : kind:IBase.CostKind.t -> is_on_ui_thread:bool -> t
val component_factory_function : t
val component_file_cyclomatic_complexity : t
val component_file_line_count : t
val component_initializer_with_side_effects : t
val component_with_multiple_factory_methods : t
val component_with_unconventional_superclass : t
val condition_always_false : t
val condition_always_true : t
val config_checks_between_markers : t
val constant_address_dereference : t
val create_intent_from_uri : t
val cross_site_scripting : t
val dangling_pointer_dereference : t
val dangling_pointer_dereference_maybe : t
val dead_store : t
val deadlock : t
val divide_by_zero : t
val do_not_report : t
an issue type that should never be reported
val empty_vector_access : t
val eradicate_condition_redundant : t
val eradicate_field_not_initialized : t
val eradicate_field_not_nullable : t
val eradicate_field_over_annotated : t
val eradicate_inconsistent_subclass_parameter_annotation : t
val eradicate_inconsistent_subclass_return_annotation : t
val eradicate_redundant_nested_class_annotation : t
val eradicate_bad_nested_class_annotation : t
val eradicate_nullable_dereference : t
val eradicate_parameter_not_nullable : t
val eradicate_return_not_nullable : t
val eradicate_return_over_annotated : t
val eradicate_unvetted_third_party_in_nullsafe : t
val eradicate_unchecked_usage_in_nullsafe : t
val eradicate_meta_class_can_be_nullsafe : t
val eradicate_meta_class_needs_improvement : t
val eradicate_meta_class_is_nullsafe : t
val exposed_insecure_intent_handling : t
val failure_exe : t
val field_not_null_checked : t
val guardedby_violation_racerd : t
val impure_function : t
val inefficient_keyset_iterator : t
val inferbo_alloc_is_big : t
val inferbo_alloc_is_negative : t
val inferbo_alloc_is_zero : t
val inferbo_alloc_may_be_big : t
val inferbo_alloc_may_be_negative : t
val infinite_cost_call : kind:IBase.CostKind.t -> t
val inherently_dangerous_function : t
val insecure_intent_handling : t
val integer_overflow_l1 : t
val integer_overflow_l2 : t
val integer_overflow_l5 : t
val integer_overflow_u5 : t
val interface_not_thread_safe : t
val internal_error : t
val invariant_call : t
val javascript_injection : t
val lab_resource_leak : t
val leak_after_array_abstraction : t
val leak_in_footprint : t
val leak_unknown_origin : t
val lockless_violation : t
val lock_consistency_violation : t
val logging_private_data : t
val expensive_loop_invariant_call : t
val memory_leak : t
val missing_fld : t
val missing_required_prop : t
val mixed_self_weakself : t
val multiple_weakself : t
val mutable_local_variable_in_component_file : t
val null_dereference : t
val nullptr_dereference : t
val parameter_not_null_checked : t
val pointer_size_mismatch : t
val precondition_not_found : t
val precondition_not_met : t
val premature_nil_termination : t
val pulse_memory_leak : t
val pure_function : t
val quandary_taint_error : t
val resource_leak : t
val retain_cycle : t
val skip_function : t
val skip_pointer_dereference : t
val shell_injection : t
val shell_injection_risk : t
val sql_injection : t
val sql_injection_risk : t
val stack_variable_address_escape : t
val starvation : t
val static_initialization_order_fiasco : t
val strict_mode_violation : t
val strong_self_not_checked : t
val symexec_memory_error : t
val thread_safety_violation : t
val topl_error : t
val unary_minus_applied_to_unsigned_expression : t
val uninitialized_value : t
val unreachable_code_after : t
val use_after_delete : t
val use_after_free : t
val use_after_lifetime : t
val untrusted_buffer_access : t
val untrusted_deserialization : t
val untrusted_deserialization_risk : t
val untrusted_file : t
val untrusted_file_risk : t
val untrusted_heap_allocation : t
val untrusted_intent_creation : t
val untrusted_url_risk : t
val untrusted_environment_change_risk : t
val untrusted_variable_length_array : t
val user_controlled_sql_risk : t
val vector_invalidation : t
val weak_self_in_noescape_block : t
val wrong_argument_number : t
val unreachable_cost_call : kind:IBase.CostKind.t -> t