diff --git a/infer/documentation/checkers/ASTLanguage.md b/infer/documentation/checkers/ASTLanguage.md index b4ba6e402..1608d0e0a 100644 --- a/infer/documentation/checkers/ASTLanguage.md +++ b/infer/documentation/checkers/ASTLanguage.md @@ -1,7 +1,7 @@ For C/C++ and Objective-C languages, we provide a linters framework. These are checks about the syntax of the program; it could be about a property, or about code inside one method, or that a class or method have certain properties. We -provide [a few checks](/docs/linters-bug-types) and we have developed a domain +provide [a few checks by default](#list-of-issue-types) and we have developed a domain specific language (DSL) to make it easier to write checks. ## AL: A declarative language for writing linters in Infer @@ -686,4 +686,4 @@ infer run --linters -- clang -c Test.m ``` There are a few other command-line options that are useful for using or -developing new linters in Infer. Read about them in the [`infer capture` manual](man-pages). +developing new linters in Infer. Read about them in the [`infer capture` manual](/docs/next/man-infer-capture). diff --git a/infer/documentation/checkers/Cost.md b/infer/documentation/checkers/Cost.md index 5c3e4a2a9..5da6717d5 100644 --- a/infer/documentation/checkers/Cost.md +++ b/infer/documentation/checkers/Cost.md @@ -21,12 +21,12 @@ The total cost of the node is the scalar product of these two vectors. Then, the At a high level, the analysis has three steps: - Choose control variables that allude to "how many times a loop may iterate". -- Get abstract ranges of the control variables from [InferBO](checker-bufferoverrun) (a numerical analysis that infers symbolic intervals) +- Get abstract ranges of the control variables from [InferBO](/docs/next/checker-bufferoverrun) (a numerical analysis that infers symbolic intervals) - Construct complexity polynomials for loops and functions by via a constraint solving algorithm. -## Examples +## Examples Infer’s cost analysis statically estimates the execution cost of a program without running the code. For instance, assume that we had the @@ -49,7 +49,7 @@ void loop(ArrayList list){ } ``` -where `foo` has a linear cost in its parameter, then Infer automatically detects that the complexity of loop has increased from `O(|list|)` to `O(|list|^2)` and then reports an [`EXECUTION_TIME_COMPLEXITY_INCREASE`](execution_time_complexity_increase) issue. +where `foo` has a linear cost in its parameter, then Infer automatically detects that the complexity of loop has increased from `O(|list|)` to `O(|list|^2)` and then reports an [`EXECUTION_TIME_COMPLEXITY_INCREASE`](/docs/next/all-issue-types#execution_time_complexity_increase) issue. @@ -59,13 +59,13 @@ Differential cost analysis in action: - first run infer's cost analysis on `File.java` and rename `costs-report.json` (which is in `/infer-out`) to `previous-costs-report.json` - modify the function as shown above - re-run infer on `File.java` and rename `costs-report.json` to `current-costs-report.json` -- run `infer reportdiff --costs-current current-costs-report.json --costs-previous current-costs-report`. +- run `infer reportdiff --costs-current current-costs-report.json --costs-previous current-costs-report`. - Inspect `infer-out/differential/introduced.json` to see the newly found complexity increase issue(s). ## Limitations -There are a number of known limitations to the design of the static cost analysis: +There are a number of known limitations to the design of the static cost analysis: - InferBo's intervals are limited to affine expressions, not full-blown polynomials. Hence, we can automatically infer bounds involving square roots. diff --git a/infer/documentation/checkers/RacerD.md b/infer/documentation/checkers/RacerD.md index 9a62410bc..4f8e118c9 100644 --- a/infer/documentation/checkers/RacerD.md +++ b/infer/documentation/checkers/RacerD.md @@ -1,6 +1,6 @@ RacerD finds data races in your C++ and Java code. This page gives a more in-depth explanation of how the analysis works *for Java code*, but may be less complete than the -[Thread Safety Violation bug description page](#thread-safety-violation). +[Thread Safety Violation bug description page](/docs/next/all-issue-types#thread_safety_violation). To run the analysis, you can use plain `infer` (to run RacerD along with other analyses that are run by default) or `infer --racerd-only` (to run only RacerD). @@ -295,7 +295,7 @@ synchronized void setFWithLock() { Unlike the other annotations shown here, this one lives in [Android](https://developer.android.com/reference/android/support/annotation/VisibleForTesting.html). -## Interprocedural Reasoning +## Interprocedural Reasoning An important feature of RacerD is that it finds races by analyzing not just one file or class, but by looking at memory accesses that occur after going through @@ -396,7 +396,7 @@ Facebook engineers. [A separate blog post looked at 100 recent data race fixes](https://code.facebook.com/posts/1537144479682247/finding-inter-procedural-bugs-at-scale-with-infer-static-analyzer/) in Infer's deployment in various bug categories, and for data races observed that 53 of them were inter-file (and thus involving multiple classes). -[See above](racerd#interprocedural) for an example of RacerD's interprocedural +[See above](#interprocedural-reasoning) for an example of RacerD's interprocedural capabilities. One reaction to the challenge of developing effective static race detectors has @@ -408,14 +408,7 @@ Rust, and the use/checking of @GuardedBy annotations in [Java](https://homes.cs.washington.edu/~mernst/pubs/locking-semantics-nfm2016.pdf) including in [Google's Error Prone analyzer](https://github.com/google/error-prone/blob/master/docs/bugpattern/GuardedBy.md). -When lock annotations are present they make the analyzer's life easier, and we -have -[GuardedBy checking as part of Infer](checkers-bug-types#UNSAFE_GUARDEDBY_ACCESS) -(though separate from the race detector). Our GuardedBy checker can find some -bugs that RacerD does not (see -[this example on anonymous inner classes](checkers-bug-types#anonymous_inner)), -but the race detector finds a greater number because it can work on un-annotated -code. It is possible to have a very effective race analysis without decreeing +When lock annotations are present they make the analyzer's life easier. It is possible to have a very effective race analysis without decreeing that such annotations must be present. This was essential for our deployment, since _requiring_ lock annotations would have been a show stopper for converting many thousands of lines of code to a concurrent context. We believe that this diff --git a/infer/documentation/issues/INTERFACE_NOT_THREAD_SAFE.md b/infer/documentation/issues/INTERFACE_NOT_THREAD_SAFE.md index bec452ec6..343b48079 100644 --- a/infer/documentation/issues/INTERFACE_NOT_THREAD_SAFE.md +++ b/infer/documentation/issues/INTERFACE_NOT_THREAD_SAFE.md @@ -3,4 +3,4 @@ with `@ThreadSafe` from a thread-safe context (e.g., code that uses locks or is marked `@ThreadSafe`). The fix is to add the `@ThreadSafe` annotation to the interface or to the interface method. For background on why these annotations are needed, see the detailed explanation -[here](racerd#interface-not-thread-safe). +[here](/docs/next/checker-racerd#interface-not-thread-safe). diff --git a/infer/documentation/issues/THREAD_SAFETY_VIOLATION.md b/infer/documentation/issues/THREAD_SAFETY_VIOLATION.md index 7b008c486..b773bb7ea 100644 --- a/infer/documentation/issues/THREAD_SAFETY_VIOLATION.md +++ b/infer/documentation/issues/THREAD_SAFETY_VIOLATION.md @@ -1,11 +1,8 @@ This warning indicates a potential data race in Java. The analyser is called RacerD and this section gives brief but a mostly complete description of its -features. See the [RacerD page](/docs/racerd) for more in-depth information and +features. See the [RacerD page](/docs/next/checker-racerd) for more in-depth information and examples. -NB this warning **is not related to @GuardedBy** and not issued by the same -analysis. - ### Thread-safety: What is a data race Here a data race is a pair of accesses to the same member field such that: diff --git a/infer/src/integration/Help.ml b/infer/src/integration/Help.ml index bf86ac7aa..ccc267ad3 100644 --- a/infer/src/integration/Help.ml +++ b/infer/src/integration/Help.ml @@ -9,7 +9,9 @@ open! IStd module F = Format module L = Logging -let mk_markdown_docs_path ~website_root ~basename = website_root ^/ "docs" ^/ basename ^ ".md" +let docs_dir = "docs" + +let mk_markdown_docs_path ~website_root ~basename = website_root ^/ docs_dir ^/ basename ^ ".md" let escape_double_quotes s = String.substr_replace_all s ~pattern:"\"" ~with_:"\\\"" @@ -19,8 +21,8 @@ let basename_checker_prefix = "checker-" let basename_of_checker {Checker.id} = basename_checker_prefix ^ id -let url_fragment_of_issue_type unique_id = - Printf.sprintf "%s#%s" all_issues_basename (String.lowercase unique_id) +let abs_url_of_issue_type unique_id = + Printf.sprintf "/%s/next/%s#%s" docs_dir all_issues_basename (String.lowercase unique_id) let get_checker_web_documentation (checker : Checker.config) = @@ -41,7 +43,8 @@ let markdown_one_issue f (issue_type : IssueType.t) = "Checker %s can report user-facing issue %s but is not of type UserFacing in \ src/base/Checker.ml. Please fix!" checker_config.id issue_type.unique_id ; - F.fprintf f "Reported as \"%s\" by [%s](%s.md).@\n@\n" issue_type.hum checker_config.id + F.fprintf f "Reported as \"%s\" by [%s](/%s/next/%s).@\n@\n" issue_type.hum checker_config.id + docs_dir (basename_of_checker checker_config) ; match issue_type.user_documentation with | None -> @@ -272,7 +275,7 @@ let pp_checker_issue_types f checker = Checker.equal issue_checker checker ) in let pp_issue f {IssueType.unique_id} = - F.fprintf f "- [%s](%s)@\n" unique_id (url_fragment_of_issue_type unique_id) + F.fprintf f "- [%s](%s)@\n" unique_id (abs_url_of_issue_type unique_id) in List.iter checker_issues ~f:(pp_issue f) @@ -304,7 +307,7 @@ let delete_checkers_website ~website_root = if String.is_prefix ~prefix:basename_checker_prefix (Filename.basename path) then ( L.progress "deleting '%s'@\n" path ; Unix.unlink path ) ) - (website_root ^/ "docs") + (website_root ^/ docs_dir) let all_checkers_website ~website_root = diff --git a/infer/src/integration/Help.mli b/infer/src/integration/Help.mli index 4748b267c..f8843b449 100644 --- a/infer/src/integration/Help.mli +++ b/infer/src/integration/Help.mli @@ -22,6 +22,6 @@ val show_issue_types : IssueType.t list -> unit val write_website : website_root:string -> unit (** generate files for the fbinfer.com website *) -val url_fragment_of_issue_type : string -> string -(** given an issue type unique ID, return the URL fragment relative to the website documentation, - e.g. [url_fragment_of_issue_type "NULL_DEREFERENCE"] is ["all-issue-types#null_dereference"] *) +val abs_url_of_issue_type : string -> string +(** given an issue type unique ID, return the URL relative to the root of the website, e.g. + [abs_url_of_issue_type "NULL_DEREFERENCE"] is ["/docs/all-issue-types#null_dereference"] *) diff --git a/infer/src/integration/XMLReport.ml b/infer/src/integration/XMLReport.ml index 0fdf4ebb8..716615363 100644 --- a/infer/src/integration/XMLReport.ml +++ b/infer/src/integration/XMLReport.ml @@ -28,11 +28,11 @@ let pp_xml_issue f (issue : Jsonbug_t.jsonbug) = in F.fprintf f {| - %s + %s |} issue.file (max issue.column 0) issue.line (max issue.column 0) (issue.line + 1) java_class_name method_name java_package issue.bug_type - (Help.url_fragment_of_issue_type issue.bug_type) + (Help.abs_url_of_issue_type issue.bug_type) issue.qualifier diff --git a/infer/tests/build_systems/results_xml/issues.exp b/infer/tests/build_systems/results_xml/issues.exp index 044ace4ac..d54696e16 100644 --- a/infer/tests/build_systems/results_xml/issues.exp +++ b/infer/tests/build_systems/results_xml/issues.exp @@ -1,5 +1,5 @@ - pointer `s` last assigned on line 11 could be null and is dereferenced at line 12, column 3. + pointer `s` last assigned on line 11 could be null and is dereferenced at line 12, column 3. diff --git a/website/checkers.json b/website/checkers.json index 9d070b0f5..77fb93fff 100644 --- a/website/checkers.json +++ b/website/checkers.json @@ -5,10 +5,11 @@ "all-issue-types", "checker-annotation-reachability", "checker-biabduction", "checker-bufferoverrun", "checker-cost", "checker-eradicate", "checker-fragment-retains-view", - "checker-immutable-cast", "checker-inefficient-keyset-iterator", - "checker-linters", "checker-litho-required-props", "checker-liveness", + "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-quandary", "checker-racerd", "checker-siof", + "checker-purity", "checker-quandary", "checker-racerd", "checker-siof", "checker-self-in-block", "checker-starvation", "checker-topl", "checker-uninit" ] diff --git a/website/docs/all-issue-types.md b/website/docs/all-issue-types.md index 21c48ac48..932beff09 100644 --- a/website/docs/all-issue-types.md +++ b/website/docs/all-issue-types.md @@ -7,7 +7,7 @@ Here is an overview of the issue types currently reported by Infer. Currently ou ## ASSIGN_POINTER_WARNING -Reported as "Assign Pointer Warning" by [linters](checker-linters.md). +Reported as "Assign Pointer Warning" by [linters](/docs/next/checker-linters). This check fires when a pointer to an Obj-C object is tagged with an `assign` property (similar to the `-Warc-unsafe-retained-assign` compiler flag). Not @@ -16,7 +16,7 @@ and use a dangling pointer. ## BAD_POINTER_COMPARISON -Reported as "Bad Pointer Comparison" by [linters](checker-linters.md). +Reported as "Bad Pointer Comparison" by [linters](/docs/next/checker-linters). Infer reports these warnings in Objective-C when a boxed primitive type such as `NSNumber *` is coerced to a boolean in a comparison. For example, consider the @@ -35,7 +35,7 @@ compare `n` to `nil` or call an accessor to clarify her intention. ## BUFFER_OVERRUN_L1 -Reported as "Buffer Overrun L1" by [bufferoverrun](checker-bufferoverrun.md). +Reported as "Buffer Overrun L1" by [bufferoverrun](/docs/next/checker-bufferoverrun). Buffer overrun reports fall into several "buckets" corresponding to the expected precision of the report. The higher the number, the more likely it is to be a false positive. @@ -84,47 +84,47 @@ Other than them, there are some specific-purpose buffer overrun reports as follo ## BUFFER_OVERRUN_L2 -Reported as "Buffer Overrun L2" by [bufferoverrun](checker-bufferoverrun.md). +Reported as "Buffer Overrun L2" by [bufferoverrun](/docs/next/checker-bufferoverrun). See [BUFFER_OVERRUN_L1](#buffer_overrun_l1) ## BUFFER_OVERRUN_L3 -Reported as "Buffer Overrun L3" by [bufferoverrun](checker-bufferoverrun.md). +Reported as "Buffer Overrun L3" by [bufferoverrun](/docs/next/checker-bufferoverrun). See [BUFFER_OVERRUN_L1](#buffer_overrun_l1) ## BUFFER_OVERRUN_L4 -Reported as "Buffer Overrun L4" by [bufferoverrun](checker-bufferoverrun.md). +Reported as "Buffer Overrun L4" by [bufferoverrun](/docs/next/checker-bufferoverrun). See [BUFFER_OVERRUN_L1](#buffer_overrun_l1) ## BUFFER_OVERRUN_L5 -Reported as "Buffer Overrun L5" by [bufferoverrun](checker-bufferoverrun.md). +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](checker-bufferoverrun.md). +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](checker-bufferoverrun.md). +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](checker-bufferoverrun.md). +Reported as "Buffer Overrun T1" by [bufferoverrun](/docs/next/checker-bufferoverrun). See [BUFFER_OVERRUN_L1](#buffer_overrun_l1) ## BUFFER_OVERRUN_U5 -Reported as "Buffer Overrun U5" by [bufferoverrun](checker-bufferoverrun.md). +Reported as "Buffer Overrun U5" by [bufferoverrun](/docs/next/checker-bufferoverrun). See [BUFFER_OVERRUN_L1](#buffer_overrun_l1) ## CAPTURED_STRONG_SELF -Reported as "Captured strongSelf" by [self-in-block](checker-self-in-block.md). +Reported as "Captured strongSelf" by [self-in-block](/docs/next/checker-self-in-block). This will happen in one of two cases generally: @@ -137,7 +137,7 @@ This will happen in one of two cases generally: ## CHECKERS_ALLOCATES_MEMORY -Reported as "Allocates Memory" by [annotation-reachability](checker-annotation-reachability.md). +Reported as "Allocates Memory" by [annotation-reachability](/docs/next/checker-annotation-reachability). A method annotated with `@NoAllocation` transitively calls `new`. @@ -154,13 +154,13 @@ class C implements I { ## CHECKERS_ANNOTATION_REACHABILITY_ERROR -Reported as "Annotation Reachability Error" by [annotation-reachability](checker-annotation-reachability.md). +Reported as "Annotation Reachability Error" by [annotation-reachability](/docs/next/checker-annotation-reachability). A method annotated with an annotation `@A` transitively calls a method annotated `@B` where the combination of annotations is forbidden (for example, `@UiThread` calling `@WorkerThread`). ## CHECKERS_CALLS_EXPENSIVE_METHOD -Reported as "Expensive Method Called" by [annotation-reachability](checker-annotation-reachability.md). +Reported as "Expensive Method Called" by [annotation-reachability](/docs/next/checker-annotation-reachability). A method annotated with `@PerformanceCritical` transitively calls a method annotated `@Expensive`. @@ -180,7 +180,7 @@ class C { ## CHECKERS_EXPENSIVE_OVERRIDES_UNANNOTATED -Reported as "Expensive Overrides Unannotated" by [annotation-reachability](checker-annotation-reachability.md). +Reported as "Expensive Overrides Unannotated" by [annotation-reachability](/docs/next/checker-annotation-reachability). A method annotated with `@Expensive` overrides an un-annotated method. @@ -199,7 +199,7 @@ class A implements I { ## CHECKERS_FRAGMENT_RETAINS_VIEW -Reported as "Fragment Retains View" by [fragment-retains-view](checker-fragment-retains-view.md). +Reported as "Fragment Retains View" by [fragment-retains-view](/docs/next/checker-fragment-retains-view). This error type is Android-specific. It fires when a `Fragment` type fails to nullify one or more of its declared `View` fields in `onDestroyView`. In @@ -213,7 +213,7 @@ Action: Nullify the `View` in question in `onDestroyView`. ## CHECKERS_IMMUTABLE_CAST -Reported as "Checkers Immutable Cast" by [immutable-cast](checker-immutable-cast.md). +Reported as "Checkers Immutable Cast" by [immutable-cast](/docs/next/checker-immutable-cast). This error type is reported in Java. It fires when an immutable collection is returned from a method whose type is mutable. @@ -233,7 +233,7 @@ collection so that it can be modified. ## CHECKERS_PRINTF_ARGS -Reported as "Checkers Printf Args" by [printf-args](checker-printf-args.md). +Reported as "Checkers Printf Args" by [printf-args](/docs/next/checker-printf-args). This error is reported when the argument types to a `printf` method do not match the format string. @@ -247,38 +247,38 @@ Action: fix the mismatch between format string and argument types. ## COMPONENT_FACTORY_FUNCTION -Reported as "Component Factory Function" by [linters](checker-linters.md). +Reported as "Component Factory Function" by [linters](/docs/next/checker-linters). ## COMPONENT_INITIALIZER_WITH_SIDE_EFFECTS -Reported as "Component Initializer With Side Effects" by [linters](checker-linters.md). +Reported as "Component Initializer With Side Effects" by [linters](/docs/next/checker-linters). ## COMPONENT_WITH_MULTIPLE_FACTORY_METHODS -Reported as "Component With Multiple Factory Methods" by [linters](checker-linters.md). +Reported as "Component With Multiple Factory Methods" by [linters](/docs/next/checker-linters). ## COMPONENT_WITH_UNCONVENTIONAL_SUPERCLASS -Reported as "Component With Unconventional Superclass" by [linters](checker-linters.md). +Reported as "Component With Unconventional Superclass" by [linters](/docs/next/checker-linters). [Doc in ComponentKit page](http://componentkit.org/docs/never-subclass-components) ## CONDITION_ALWAYS_FALSE -Reported as "Condition Always False" by [bufferoverrun](checker-bufferoverrun.md). +Reported as "Condition Always False" by [bufferoverrun](/docs/next/checker-bufferoverrun). A condition expression is **always** evaluated to false. ## CONDITION_ALWAYS_TRUE -Reported as "Condition Always True" by [bufferoverrun](checker-bufferoverrun.md). +Reported as "Condition Always True" by [bufferoverrun](/docs/next/checker-bufferoverrun). A condition expression is **always** evaluated to true. ## CONSTANT_ADDRESS_DEREFERENCE -Reported as "Constant Address Dereference" by [pulse](checker-pulse.md). +Reported as "Constant Address Dereference" by [pulse](/docs/next/checker-pulse). This is reported when an address obtained via a non-zero constant is dereferenced. If the address is zero then @@ -289,17 +289,17 @@ type. ## CREATE_INTENT_FROM_URI -Reported as "Create Intent From Uri" by [quandary](checker-quandary.md). +Reported as "Create Intent From Uri" by [quandary](/docs/next/checker-quandary). 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. ## CROSS_SITE_SCRIPTING -Reported as "Cross Site Scripting" by [quandary](checker-quandary.md). +Reported as "Cross Site Scripting" by [quandary](/docs/next/checker-quandary). Untrusted data flows into HTML; XSS risk. ## CXX_REFERENCE_CAPTURED_IN_OBJC_BLOCK -Reported as "Cxx Reference Captured In Objc Block" by [linters](checker-linters.md). +Reported as "Cxx Reference Captured In Objc Block" by [linters](/docs/next/checker-linters). With this check, Infer detects C++ references captured in a block. Doing this is almost always wrong. The reason is that C++ references are not managed pointers @@ -318,7 +318,7 @@ const int copied_v = v; ## DEADLOCK -Reported as "Deadlock" by [starvation](checker-starvation.md). +Reported as "Deadlock" by [starvation](/docs/next/checker-starvation). This error is currently reported in Java. A deadlock occurs when two distinct threads try to acquire two locks in reverse orders. The following code @@ -383,14 +383,14 @@ To suppress reports of deadlocks in a method `m()` use the ## DEAD_STORE -Reported as "Dead Store" by [liveness](checker-liveness.md). +Reported as "Dead Store" by [liveness](/docs/next/checker-liveness). This error is reported in C++. It fires when the value assigned to a variables is never used (e.g., `int i = 1; i = 2; return i;`). ## DIRECT_ATOMIC_PROPERTY_ACCESS -Reported as "Direct Atomic Property Access" by [linters](checker-linters.md). +Reported as "Direct Atomic Property Access" by [linters](/docs/next/checker-linters). This check warns you when you are accessing an atomic property directly with an ivar. This makes the atomic property not atomic anymore. So potentially you may @@ -400,7 +400,7 @@ To fix the problem you need to access properties with their getter or setter. ## DISCOURAGED_WEAK_PROPERTY_CUSTOM_SETTER -Reported as "Discouraged Weak Property Custom Setter" by [linters](checker-linters.md). +Reported as "Discouraged Weak Property Custom Setter" by [linters](/docs/next/checker-linters). This check warns you when you have a custom setter for a weak property. When compiled with Automatic Reference Counting (ARC, `-fobj-arc`) ARC may set the @@ -469,7 +469,7 @@ Note that the custom setter was only invoked once. ## EMPTY_VECTOR_ACCESS -Reported as "Empty Vector Access" by [biabduction](checker-biabduction.md). +Reported as "Empty Vector Access" by [biabduction](/docs/next/checker-biabduction). This error type is reported only in C++, in versions >= C++11. @@ -486,7 +486,7 @@ int foo(){ ## ERADICATE_CONDITION_REDUNDANT -Reported as "Condition Redundant" by [eradicate](checker-eradicate.md). +Reported as "Condition Redundant" by [eradicate](/docs/next/checker-eradicate). This report is inactive by default. Condition (x != null) or (x == null) when x cannot be null: the first condition is always true and the second is always @@ -513,7 +513,7 @@ relevant. If the annotations are correct, you can remove the redundant case. ## ERADICATE_FIELD_NOT_INITIALIZED -Reported as "Field Not Initialized" by [eradicate](checker-eradicate.md). +Reported as "Field Not Initialized" by [eradicate](/docs/next/checker-eradicate). The constructor does not initialize a field f which is not annotated with @Nullable @@ -535,7 +535,7 @@ annotated with @Nullable. ## ERADICATE_FIELD_NOT_NULLABLE -Reported as "Field Not Nullable" by [eradicate](checker-eradicate.md). +Reported as "Field Not Nullable" by [eradicate](/docs/next/checker-eradicate). An assignment x.f = v where v could be null and field f is not annotated with @Nullable. @@ -560,7 +560,7 @@ values. ## ERADICATE_INCONSISTENT_SUBCLASS_PARAMETER_ANNOTATION -Reported as "Inconsistent Subclass Parameter Annotation" by [eradicate](checker-eradicate.md). +Reported as "Inconsistent Subclass Parameter Annotation" by [eradicate](/docs/next/checker-eradicate). A parameter of the overridden method is missing a @Nullable annotation present in the superclass. @@ -605,7 +605,7 @@ public class Main { ## ERADICATE_INCONSISTENT_SUBCLASS_RETURN_ANNOTATION -Reported as "Inconsistent Subclass Return Annotation" by [eradicate](checker-eradicate.md). +Reported as "Inconsistent Subclass Return Annotation" by [eradicate](/docs/next/checker-eradicate). The return type of the overridden method is annotated @Nullable, but the corresponding method in the superclass is not. @@ -649,7 +649,7 @@ class Main { ## ERADICATE_PARAMETER_NOT_NULLABLE -Reported as "Parameter Not Nullable" by [eradicate](checker-eradicate.md). +Reported as "Parameter Not Nullable" by [eradicate](/docs/next/checker-eradicate). Method call x.m(..., v, ...) where v can be null and the corresponding parameter in method m is not annotated with @Nullable @@ -676,7 +676,7 @@ of method m, as that code must now deal with null values. ## ERADICATE_RETURN_NOT_NULLABLE -Reported as "Return Not Nullable" by [eradicate](checker-eradicate.md). +Reported as "Return Not Nullable" by [eradicate](/docs/next/checker-eradicate). Method m can return null, but the method's return type is not annotated with @Nullable @@ -699,7 +699,7 @@ deal with null values. ## ERADICATE_RETURN_OVER_ANNOTATED -Reported as "Return Over Annotated" by [eradicate](checker-eradicate.md). +Reported as "Return Over Annotated" by [eradicate](/docs/next/checker-eradicate). This report is inactive by default. Method m is annotated with @Nullable but the method cannot return null @@ -724,7 +724,7 @@ annotation. ## EXECUTION_TIME_COMPLEXITY_INCREASE -Reported as "Execution Time Complexity Increase" by [cost](checker-cost.md). +Reported as "Execution Time Complexity Increase" by [cost](/docs/next/checker-cost). Infer reports this issue when the execution time complexity of a program increases in degree: e.g. from constant to linear or from @@ -736,7 +736,7 @@ two runs of infer on a file. ## EXECUTION_TIME_COMPLEXITY_INCREASE_UI_THREAD -Reported as "Execution Time Complexity Increase Ui Thread" by [cost](checker-cost.md). +Reported as "Execution Time Complexity Increase Ui Thread" by [cost](/docs/next/checker-cost). Infer reports this issue when the execution time complexity of the procedure increases in degree **and** the procedure runs on the UI (main) thread. @@ -752,7 +752,7 @@ Infer considers a method as running on the UI thread whenever: ## EXECUTION_TIME_UNREACHABLE_AT_EXIT -Reported as "Execution Time Unreachable At Exit" by [cost](checker-cost.md). +Reported as "Execution Time Unreachable At Exit" by [cost](/docs/next/checker-cost). This issue type indicates that the program's execution doesn't reach the exit node. Hence, we cannot compute a static bound for the @@ -771,14 +771,41 @@ void infeasible_path_unreachable() { } ``` +## EXPENSIVE_LOOP_INVARIANT_CALL + +Reported as "Expensive Loop Invariant Call" by [loop-hoisting](/docs/next/checker-loop-hoisting). + +We report this issue type when a function is [loop-invariant](/docs/next/all-issue-types#invariant_call) and also expensive (i.e. at least has linear complexity as determined by the [cost](/docs/next/checker-cost) analysis). + +```java +int incr(int x) { + return x + 1; +} + +// incr will not be hoisted since it is cheap(constant time) +void foo_linear(int size) { + int x = 10; + for (int i = 0; i < size; i++) { + incr(x); // constant call, don't hoist + } +} + +// call to foo_linear will be hoisted since it is expensive(linear in size). +void symbolic_expensive_hoist(int size) { + for (int i = 0; i < size; i++) { + foo_linear(size); // hoist + } +} +``` + ## EXPOSED_INSECURE_INTENT_HANDLING -Reported as "Exposed Insecure Intent Handling" by [quandary](checker-quandary.md). +Reported as "Exposed Insecure Intent Handling" by [quandary](/docs/next/checker-quandary). Undocumented. ## GLOBAL_VARIABLE_INITIALIZED_WITH_FUNCTION_OR_METHOD_CALL -Reported as "Global Variable Initialized With Function Or Method Call" by [linters](checker-linters.md). +Reported as "Global Variable Initialized With Function Or Method Call" by [linters](/docs/next/checker-linters). This checker warns you when the initialization of global variable contain a method or function call. The warning wants to make you aware that some functions @@ -787,7 +814,7 @@ these initializations can slow down the start-up time of an app. ## GUARDEDBY_VIOLATION -Reported as "GuardedBy Violation" by [racerd](checker-racerd.md). +Reported as "GuardedBy Violation" by [racerd](/docs/next/checker-racerd). A field annotated with `@GuardedBy` is being accessed by a call-chain that starts at a non-private method without synchronization. @@ -806,9 +833,24 @@ class C { Action: Protect the offending access by acquiring the lock indicated by the `@GuardedBy(...)`. +## IMPURE_FUNCTION + +Reported as "Impure Function" by [impurity](/docs/next/checker-impurity). + +This issue type indicates impure functions. For instance, below functions would be marked as impure: +```java +void makeAllZero_impure(ArrayList list) { + Iterator listIterator = list.iterator(); + while (listIterator.hasNext()) { + Foo foo = listIterator.next(); + foo.x = 0; + } +} +``` + ## INEFFICIENT_KEYSET_ITERATOR -Reported as "Inefficient Keyset Iterator" by [inefficient-keyset-iterator](checker-inefficient-keyset-iterator.md). +Reported as "Inefficient Keyset Iterator" by [inefficient-keyset-iterator](/docs/next/checker-inefficient-keyset-iterator). This issue is raised when - iterating over a HashMap with `ketSet()` iterator @@ -839,37 +881,37 @@ void efficient_loop_ok(HashMap testMap) { ## INFERBO_ALLOC_IS_BIG -Reported as "Inferbo Alloc Is Big" by [bufferoverrun](checker-bufferoverrun.md). +Reported as "Inferbo Alloc Is Big" by [bufferoverrun](/docs/next/checker-bufferoverrun). `malloc` is passed a large constant value. ## INFERBO_ALLOC_IS_NEGATIVE -Reported as "Inferbo Alloc Is Negative" by [bufferoverrun](checker-bufferoverrun.md). +Reported as "Inferbo Alloc Is Negative" by [bufferoverrun](/docs/next/checker-bufferoverrun). `malloc` is called with a negative size. ## INFERBO_ALLOC_IS_ZERO -Reported as "Inferbo Alloc Is Zero" by [bufferoverrun](checker-bufferoverrun.md). +Reported as "Inferbo Alloc Is Zero" by [bufferoverrun](/docs/next/checker-bufferoverrun). `malloc` is called with a zero size. ## INFERBO_ALLOC_MAY_BE_BIG -Reported as "Inferbo Alloc May Be Big" by [bufferoverrun](checker-bufferoverrun.md). +Reported as "Inferbo Alloc May Be Big" by [bufferoverrun](/docs/next/checker-bufferoverrun). `malloc` *may* be called with a large value. ## INFERBO_ALLOC_MAY_BE_NEGATIVE -Reported as "Inferbo Alloc May Be Negative" by [bufferoverrun](checker-bufferoverrun.md). +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](checker-bufferoverrun.md). +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](checker-cost.md). +Reported as "Infinite Execution Time" by [cost](/docs/next/checker-cost). This warning indicates that Infer was not able to determine a static upper bound on the execution cost of the procedure. By default, this @@ -893,12 +935,12 @@ Consequently, we report an `INFINITE_EXECUTION_TIME`, corresponding to the bigge ## INSECURE_INTENT_HANDLING -Reported as "Insecure Intent Handling" by [quandary](checker-quandary.md). +Reported as "Insecure Intent Handling" by [quandary](/docs/next/checker-quandary). Undocumented. ## INTEGER_OVERFLOW_L1 -Reported as "Integer Overflow L1" by [bufferoverrun](checker-bufferoverrun.md). +Reported as "Integer Overflow L1" by [bufferoverrun](/docs/next/checker-bufferoverrun). Integer overflows reports fall into several "buckets" corresponding to the expected precision of the report. The higher the number, the more likely it is to be a false positive. @@ -921,38 +963,62 @@ Other than them, there as some specific-purpose buffer overrun reports as follow ## INTEGER_OVERFLOW_L2 -Reported as "Integer Overflow L2" by [bufferoverrun](checker-bufferoverrun.md). +Reported as "Integer Overflow L2" by [bufferoverrun](/docs/next/checker-bufferoverrun). See [INTEGER_OVERFLOW_L1](#integer_overflow_l1) ## INTEGER_OVERFLOW_L5 -Reported as "Integer Overflow L5" by [bufferoverrun](checker-bufferoverrun.md). +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](checker-bufferoverrun.md). +Reported as "Integer Overflow R2" by [bufferoverrun](/docs/next/checker-bufferoverrun). See [INTEGER_OVERFLOW_L1](#integer_overflow_l1) ## INTEGER_OVERFLOW_U5 -Reported as "Integer Overflow U5" by [bufferoverrun](checker-bufferoverrun.md). +Reported as "Integer Overflow U5" by [bufferoverrun](/docs/next/checker-bufferoverrun). See [INTEGER_OVERFLOW_L1](#integer_overflow_l1) ## INTERFACE_NOT_THREAD_SAFE -Reported as "Interface Not Thread Safe" by [racerd](checker-racerd.md). +Reported as "Interface Not Thread Safe" by [racerd](/docs/next/checker-racerd). This error indicates that you have invoked an interface method not annotated with `@ThreadSafe` from a thread-safe context (e.g., code that uses locks or is marked `@ThreadSafe`). The fix is to add the `@ThreadSafe` annotation to the interface or to the interface method. For background on why these annotations are needed, see the detailed explanation -[here](racerd#interface-not-thread-safe). +[here](/docs/next/checker-racerd#interface-not-thread-safe). + +## INVARIANT_CALL + +Reported as "Invariant Call" by [loop-hoisting](/docs/next/checker-loop-hoisting). + +We report this issue type when a function call is loop-invariant and hoistable, i.e. +- the function has no side side effects (pure) +- has invariant arguments and result (i.e. have the same value in all loop iterations) +- it is guaranteed to execute, i.e. it dominates all loop sources + +```java +int foo(int x, int y) { + return x + y; +} + + +void invariant_hoist(int size) { + int x = 10; + int y = 5; + for (int i = 0; i < size; i++) { + foo(x, y); // hoistable + } + } +``` ## IVAR_NOT_NULL_CHECKED -Reported as "Ivar Not Null Checked" by [biabduction](checker-biabduction.md). +Reported as "Ivar Not Null Checked" by [biabduction](/docs/next/checker-biabduction). This error type is only reported in Objective-C. This is similar to Null dereference, but Infer hasn't found a whole trace where the error can happen, @@ -971,12 +1037,12 @@ is not called with `nil`. ## JAVASCRIPT_INJECTION -Reported as "Javascript Injection" by [quandary](checker-quandary.md). +Reported as "Javascript Injection" by [quandary](/docs/next/checker-quandary). Untrusted data flows into JavaScript. ## LOCKLESS_VIOLATION -Reported as "Lockless Violation" by [starvation](checker-starvation.md). +Reported as "Lockless Violation" by [starvation](/docs/next/checker-starvation). A method implements an interface signature annotated with `@Lockless` but which transitively acquires a lock. @@ -999,7 +1065,7 @@ class C implements I { ## LOCK_CONSISTENCY_VIOLATION -Reported as "Lock Consistency Violation" by [racerd](checker-racerd.md). +Reported as "Lock Consistency Violation" by [racerd](/docs/next/checker-racerd). This is a C++ and Objective C error reported whenever: @@ -1024,12 +1090,12 @@ container (an array, a vector, etc). ## LOGGING_PRIVATE_DATA -Reported as "Logging Private Data" by [quandary](checker-quandary.md). +Reported as "Logging Private Data" by [quandary](/docs/next/checker-quandary). Undocumented. ## MEMORY_LEAK -Reported as "Memory Leak" by [pulse](checker-pulse.md). +Reported as "Memory Leak" by [pulse](/docs/next/checker-pulse). ### Memory leak in C @@ -1056,9 +1122,14 @@ objects from Core Foundation or Core Graphics don't get released. } ``` +## MISSING_REQUIRED_PROP + +Reported as "Missing Required Prop" by [litho-required-props](/docs/next/checker-litho-required-props). + +As explained by the analysis. ## MIXED_SELF_WEAKSELF -Reported as "Mixed Self WeakSelf" by [self-in-block](checker-self-in-block.md). +Reported as "Mixed Self WeakSelf" by [self-in-block](/docs/next/checker-self-in-block). This happens when an Objective-C block captures both `self` and `weakSelf`, a weak pointer to `self`. Possibly the developer meant to capture only `weakSelf` @@ -1067,7 +1138,7 @@ instead of `strongSelf`. In this case, this could cause a retain cycle. ## MULTIPLE_WEAKSELF -Reported as "Multiple WeakSelf Use" by [self-in-block](checker-self-in-block.md). +Reported as "Multiple WeakSelf Use" by [self-in-block](/docs/next/checker-self-in-block). An Objective-C block uses `weakSelf` more than once. This could lead to unexpected behaviour. Even if `weakSelf` is not nil in the first use, it could @@ -1077,18 +1148,18 @@ in the block. ## MUTABLE_LOCAL_VARIABLE_IN_COMPONENT_FILE -Reported as "Mutable Local Variable In Component File" by [linters](checker-linters.md). +Reported as "Mutable Local Variable In Component File" by [linters](/docs/next/checker-linters). [Doc in ComponentKit page](http://componentkit.org/docs/avoid-local-variables) ## NULLPTR_DEREFERENCE -Reported as "Nullptr Dereference" by [pulse](checker-pulse.md). +Reported as "Nullptr Dereference" by [pulse](/docs/next/checker-pulse). See [NULL_DEREFERENCE](#null_dereference). ## NULL_DEREFERENCE -Reported as "Null Dereference" by [biabduction](checker-biabduction.md). +Reported as "Null Dereference" by [biabduction](/docs/next/checker-biabduction). Infer reports null dereference bugs in C, Objective-C and Java. The issue is about a pointer that can be `null` and it is dereferenced. This leads to a crash @@ -1190,7 +1261,7 @@ but that is for later. ## PARAMETER_NOT_NULL_CHECKED -Reported as "Parameter Not Null Checked" by [biabduction](checker-biabduction.md). +Reported as "Parameter Not Null Checked" by [biabduction](/docs/next/checker-biabduction). This error type is reported only in Objective-C. It is similar to Null dereference, but Infer hasn't found a whole trace where the error can happen, @@ -1219,7 +1290,7 @@ system), that the argument won't be `nil`. This will silence the warning. ## POINTER_TO_CONST_OBJC_CLASS -Reported as "Pointer To Const Objc Class" by [linters](checker-linters.md). +Reported as "Pointer To Const Objc Class" by [linters](/docs/next/checker-linters). In Objective-C, `const Class *` represents a mutable pointer pointing to an Objective-C class where the ivars cannot be changed. More useful is @@ -1228,7 +1299,7 @@ changed. ## PREMATURE_NIL_TERMINATION_ARGUMENT -Reported as "Premature Nil Termination Argument" by [biabduction](checker-biabduction.md). +Reported as "Premature Nil Termination Argument" by [biabduction](/docs/next/checker-biabduction). This error type is reported in C and Objective-C. In many variadic methods, `nil` is used to signify the end of the list of input objects. This is similar @@ -1246,14 +1317,52 @@ An example of such variadic methods is In this example, if `str` is `nil` then an array `@[@"aaa"]` of size 1 will be created, and not an array `@[@"aaa", str, @"bbb"]` of size 3 as expected. +## PURE_FUNCTION + +Reported as "Pure Function" by [purity](/docs/next/checker-purity). + +This issue type indicates pure functions. For instance, below functions would be marked as pure: + +```java +int local_write_pure(int x, int y) { + int k = x + y; + k++; + return k; +} + +// no change to outside state, the local allocation is ok. +int local_alloc_pure(ArrayList list) { + ArrayList list_new = new ArrayList(); + for (Integer el : list) { + list_new.add(el); + } + return list_new.size(); +} +``` + +However, the following ones would not be pure: + +```java +void swap_impure(int[] array, int i, int j) { + int tmp = array[i]; + array[i] = array[j]; // modifying the input array + array[j] = tmp; +} + +int a = 0; +void set_impure(int x, int y) { + a = x + y; //modifying a global variable +} +``` + ## QUANDARY_TAINT_ERROR -Reported as "Taint Error" by [quandary](checker-quandary.md). +Reported as "Taint Error" by [quandary](/docs/next/checker-quandary). Generic taint error when nothing else fits. ## REGISTERED_OBSERVER_BEING_DEALLOCATED -Reported as "Registered Observer Being Deallocated" by [linters](checker-linters.md). +Reported as "Registered Observer Being Deallocated" by [linters](/docs/next/checker-linters). Objects register with a notification center to receive notifications. This check warns you when an object is registered as observer of a NSNotificationCenter but @@ -1263,7 +1372,7 @@ object has been deallocated. In that case we would get a crash. ## RESOURCE_LEAK -Reported as "Resource Leak" by [biabduction](checker-biabduction.md). +Reported as "Resource Leak" by [biabduction](/docs/next/checker-biabduction). Infer reports resource leaks in C, Objective-C and Java. In general, resources are entities such as files, sockets, connections, etc, that need to be closed @@ -1541,7 +1650,7 @@ useful, but you cannot use it blindly when you see a resource-allocation site. ## RETAIN_CYCLE -Reported as "Retain Cycle" by [biabduction](checker-biabduction.md). +Reported as "Retain Cycle" by [biabduction](/docs/next/checker-biabduction). A retain cycle is a situation when object A retains object B, and object B retains object A at the same time. Here is an example: @@ -1576,27 +1685,27 @@ hierarchy: ## SHELL_INJECTION -Reported as "Shell Injection" by [quandary](checker-quandary.md). +Reported as "Shell Injection" by [quandary](/docs/next/checker-quandary). Environment variable or file data flowing to shell. ## SHELL_INJECTION_RISK -Reported as "Shell Injection Risk" by [quandary](checker-quandary.md). +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. ## SQL_INJECTION -Reported as "Sql Injection" by [quandary](checker-quandary.md). +Reported as "Sql Injection" by [quandary](/docs/next/checker-quandary). Untrusted and unescaped data flows to SQL. ## SQL_INJECTION_RISK -Reported as "Sql Injection Risk" by [quandary](checker-quandary.md). +Reported as "Sql Injection Risk" by [quandary](/docs/next/checker-quandary). Untrusted and unescaped data flows to SQL. ## STACK_VARIABLE_ADDRESS_ESCAPE -Reported as "Stack Variable Address Escape" by [pulse](checker-pulse.md). +Reported as "Stack Variable Address Escape" by [pulse](/docs/next/checker-pulse). Reported when an address pointing into the stack of the current function will escape to its calling context. Such addresses will @@ -1614,7 +1723,7 @@ int* foo() { ## STARVATION -Reported as "UI Thread Starvation" by [starvation](checker-starvation.md). +Reported as "UI Thread Starvation" by [starvation](/docs/next/checker-starvation). This error is reported in Java, and specifically on Android. These reports are triggered when a method that runs on the UI thread may block, thus potentially @@ -1674,7 +1783,7 @@ include the JAR files in `infer/annotations` for this annotation to work. ## STATIC_INITIALIZATION_ORDER_FIASCO -Reported as "Static Initialization Order Fiasco" by [siof](checker-siof.md). +Reported as "Static Initialization Order Fiasco" by [siof](/docs/next/checker-siof). This error is reported in C++. It fires when the initialization of a static variable `A`, accesses a static variable `B` from another translation unit @@ -1686,7 +1795,7 @@ For more technical definition and techniques to avoid/remediate, see the ## STRICT_MODE_VIOLATION -Reported as "Strict Mode Violation" by [starvation](checker-starvation.md). +Reported as "Strict Mode Violation" by [starvation](/docs/next/checker-starvation). Android has a feature called [strict mode](https://developer.android.com/reference/android/os/StrictMode), @@ -1700,7 +1809,7 @@ To suppress this warning, it's enough to annotate the offending method with ## STRONG_DELEGATE_WARNING -Reported as "Strong Delegate Warning" by [linters](checker-linters.md). +Reported as "Strong Delegate Warning" by [linters](/docs/next/checker-linters). This check warns you when you have a property called delegate or variations thereof which is declared strong. The idea is that delegates should generally be @@ -1708,7 +1817,7 @@ weak, otherwise this may cause retain cycles. ## STRONG_SELF_NOT_CHECKED -Reported as "StrongSelf Not Checked" by [self-in-block](checker-self-in-block.md). +Reported as "StrongSelf Not Checked" by [self-in-block](/docs/next/checker-self-in-block). When a block captures `weakSelf` in the following pattern: @@ -1725,16 +1834,13 @@ otherwise this could cause a crash because the weak pointer `weakSelf` could be ## THREAD_SAFETY_VIOLATION -Reported as "Thread Safety Violation" by [racerd](checker-racerd.md). +Reported as "Thread Safety Violation" by [racerd](/docs/next/checker-racerd). This warning indicates a potential data race in Java. The analyser is called RacerD and this section gives brief but a mostly complete description of its -features. See the [RacerD page](/docs/racerd) for more in-depth information and +features. See the [RacerD page](/docs/next/checker-racerd) for more in-depth information and examples. -NB this warning **is not related to @GuardedBy** and not issued by the same -analysis. - ### Thread-safety: What is a data race Here a data race is a pair of accesses to the same member field such that: @@ -1824,7 +1930,7 @@ These annotations can be found at `com.facebook.infer.annotation.*`. ## UNAVAILABLE_API_IN_SUPPORTED_IOS_SDK -Reported as "Unavailable Api In Supported Ios Sdk" by [linters](checker-linters.md). +Reported as "Unavailable Api In Supported Ios Sdk" by [linters](/docs/next/checker-linters). This checks warns you when you are using an API (constant, method call, etc.) that is only defined in a version higher than the version that you support. To @@ -1849,7 +1955,7 @@ if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_9_0) { ## UNINITIALIZED_VALUE -Reported as "Uninitialized Value" by [uninit](checker-uninit.md). +Reported as "Uninitialized Value" by [uninit](/docs/next/checker-uninit). A value is read before it has been initialized. For example, in C: @@ -1873,79 +1979,79 @@ void foo() { ## UNREACHABLE_CODE -Reported as "Unreachable Code" by [bufferoverrun](checker-bufferoverrun.md). +Reported as "Unreachable Code" by [bufferoverrun](/docs/next/checker-bufferoverrun). A program point is unreachable. ## UNTRUSTED_BUFFER_ACCESS -Reported as "Untrusted Buffer Access" by [quandary](checker-quandary.md). +Reported as "Untrusted Buffer Access" by [quandary](/docs/next/checker-quandary). Untrusted data of any kind flowing to buffer. ## UNTRUSTED_DESERIALIZATION -Reported as "Untrusted Deserialization" by [quandary](checker-quandary.md). +Reported as "Untrusted Deserialization" by [quandary](/docs/next/checker-quandary). User-controlled deserialization. ## UNTRUSTED_DESERIALIZATION_RISK -Reported as "Untrusted Deserialization Risk" by [quandary](checker-quandary.md). +Reported as "Untrusted Deserialization Risk" by [quandary](/docs/next/checker-quandary). User-controlled deserialization ## UNTRUSTED_ENVIRONMENT_CHANGE_RISK -Reported as "Untrusted Environment Change Risk" by [quandary](checker-quandary.md). +Reported as "Untrusted Environment Change Risk" by [quandary](/docs/next/checker-quandary). User-controlled environment mutation. ## UNTRUSTED_FILE -Reported as "Untrusted File" by [quandary](checker-quandary.md). +Reported as "Untrusted File" by [quandary](/docs/next/checker-quandary). User-controlled file creation; may be vulnerable to path traversal and more. ## UNTRUSTED_FILE_RISK -Reported as "Untrusted File Risk" by [quandary](checker-quandary.md). +Reported as "Untrusted File Risk" by [quandary](/docs/next/checker-quandary). User-controlled file creation; may be vulnerable to path traversal and more. ## UNTRUSTED_HEAP_ALLOCATION -Reported as "Untrusted Heap Allocation" by [quandary](checker-quandary.md). +Reported as "Untrusted Heap Allocation" by [quandary](/docs/next/checker-quandary). Untrusted data of any kind flowing to heap allocation. this can cause crashes or DOS. ## UNTRUSTED_INTENT_CREATION -Reported as "Untrusted Intent Creation" by [quandary](checker-quandary.md). +Reported as "Untrusted Intent Creation" by [quandary](/docs/next/checker-quandary). Creating an Intent from user-controlled data. ## UNTRUSTED_URL_RISK -Reported as "Untrusted Url Risk" by [quandary](checker-quandary.md). +Reported as "Untrusted Url Risk" by [quandary](/docs/next/checker-quandary). Untrusted flag, environment variable, or file data flowing to URL. ## UNTRUSTED_VARIABLE_LENGTH_ARRAY -Reported as "Untrusted Variable Length Array" by [quandary](checker-quandary.md). +Reported as "Untrusted Variable Length Array" by [quandary](/docs/next/checker-quandary). 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. ## USER_CONTROLLED_SQL_RISK -Reported as "User Controlled Sql Risk" by [quandary](checker-quandary.md). +Reported as "User Controlled Sql Risk" by [quandary](/docs/next/checker-quandary). Untrusted data flows to SQL (no injection risk). ## USE_AFTER_DELETE -Reported as "Use After Delete" by [pulse](checker-pulse.md). +Reported as "Use After Delete" by [pulse](/docs/next/checker-pulse). An address that was invalidated by a call to `delete` in C++ is dereferenced. ## USE_AFTER_FREE -Reported as "Use After Free" by [pulse](checker-pulse.md). +Reported as "Use After Free" by [pulse](/docs/next/checker-pulse). An address that was invalidated by a call to `free` in C is dereferenced. ## USE_AFTER_LIFETIME -Reported as "Use After Lifetime" by [pulse](checker-pulse.md). +Reported as "Use After Lifetime" by [pulse](/docs/next/checker-pulse). The lifetime of an object has ended but that object is being accessed. For example, the address of a variable holding a C++ object @@ -1964,7 +2070,7 @@ void foo() { ## WEAK_SELF_IN_NO_ESCAPE_BLOCK -Reported as "Weak Self In No Escape Block" by [self-in-block](checker-self-in-block.md). +Reported as "Weak Self In No Escape Block" by [self-in-block](/docs/next/checker-self-in-block). In many methods that take a block as an argument, the block position is annotated with NS_NOESCAPE to mark that the block passed to this method won't be diff --git a/website/docs/checker-annotation-reachability.md b/website/docs/checker-annotation-reachability.md index 1f0405ff0..6a049f2fe 100644 --- a/website/docs/checker-annotation-reachability.md +++ b/website/docs/checker-annotation-reachability.md @@ -16,7 +16,7 @@ Supported languages: ## List of Issue Types The following issue types are reported by this checker: -- [CHECKERS_ALLOCATES_MEMORY](all-issue-types#checkers_allocates_memory) -- [CHECKERS_ANNOTATION_REACHABILITY_ERROR](all-issue-types#checkers_annotation_reachability_error) -- [CHECKERS_CALLS_EXPENSIVE_METHOD](all-issue-types#checkers_calls_expensive_method) -- [CHECKERS_EXPENSIVE_OVERRIDES_UNANNOTATED](all-issue-types#checkers_expensive_overrides_unannotated) +- [CHECKERS_ALLOCATES_MEMORY](/docs/next/all-issue-types#checkers_allocates_memory) +- [CHECKERS_ANNOTATION_REACHABILITY_ERROR](/docs/next/all-issue-types#checkers_annotation_reachability_error) +- [CHECKERS_CALLS_EXPENSIVE_METHOD](/docs/next/all-issue-types#checkers_calls_expensive_method) +- [CHECKERS_EXPENSIVE_OVERRIDES_UNANNOTATED](/docs/next/all-issue-types#checkers_expensive_overrides_unannotated) diff --git a/website/docs/checker-biabduction.md b/website/docs/checker-biabduction.md index a9a785abe..e86984959 100644 --- a/website/docs/checker-biabduction.md +++ b/website/docs/checker-biabduction.md @@ -16,10 +16,10 @@ Read more about its foundations in the [Separation Logic and Biabduction page](s ## List of Issue Types The following issue types are reported by this checker: -- [EMPTY_VECTOR_ACCESS](all-issue-types#empty_vector_access) -- [IVAR_NOT_NULL_CHECKED](all-issue-types#ivar_not_null_checked) -- [NULL_DEREFERENCE](all-issue-types#null_dereference) -- [PARAMETER_NOT_NULL_CHECKED](all-issue-types#parameter_not_null_checked) -- [PREMATURE_NIL_TERMINATION_ARGUMENT](all-issue-types#premature_nil_termination_argument) -- [RESOURCE_LEAK](all-issue-types#resource_leak) -- [RETAIN_CYCLE](all-issue-types#retain_cycle) +- [EMPTY_VECTOR_ACCESS](/docs/next/all-issue-types#empty_vector_access) +- [IVAR_NOT_NULL_CHECKED](/docs/next/all-issue-types#ivar_not_null_checked) +- [NULL_DEREFERENCE](/docs/next/all-issue-types#null_dereference) +- [PARAMETER_NOT_NULL_CHECKED](/docs/next/all-issue-types#parameter_not_null_checked) +- [PREMATURE_NIL_TERMINATION_ARGUMENT](/docs/next/all-issue-types#premature_nil_termination_argument) +- [RESOURCE_LEAK](/docs/next/all-issue-types#resource_leak) +- [RETAIN_CYCLE](/docs/next/all-issue-types#retain_cycle) diff --git a/website/docs/checker-bufferoverrun.md b/website/docs/checker-bufferoverrun.md index 09ce61866..6c33fc784 100644 --- a/website/docs/checker-bufferoverrun.md +++ b/website/docs/checker-bufferoverrun.md @@ -16,26 +16,26 @@ You can read about its origins in this [blog post](https://research.fb.com/infer ## List of Issue Types The following issue types are reported by this checker: -- [BUFFER_OVERRUN_L1](all-issue-types#buffer_overrun_l1) -- [BUFFER_OVERRUN_L2](all-issue-types#buffer_overrun_l2) -- [BUFFER_OVERRUN_L3](all-issue-types#buffer_overrun_l3) -- [BUFFER_OVERRUN_L4](all-issue-types#buffer_overrun_l4) -- [BUFFER_OVERRUN_L5](all-issue-types#buffer_overrun_l5) -- [BUFFER_OVERRUN_R2](all-issue-types#buffer_overrun_r2) -- [BUFFER_OVERRUN_S2](all-issue-types#buffer_overrun_s2) -- [BUFFER_OVERRUN_T1](all-issue-types#buffer_overrun_t1) -- [BUFFER_OVERRUN_U5](all-issue-types#buffer_overrun_u5) -- [CONDITION_ALWAYS_FALSE](all-issue-types#condition_always_false) -- [CONDITION_ALWAYS_TRUE](all-issue-types#condition_always_true) -- [INFERBO_ALLOC_IS_BIG](all-issue-types#inferbo_alloc_is_big) -- [INFERBO_ALLOC_IS_NEGATIVE](all-issue-types#inferbo_alloc_is_negative) -- [INFERBO_ALLOC_IS_ZERO](all-issue-types#inferbo_alloc_is_zero) -- [INFERBO_ALLOC_MAY_BE_BIG](all-issue-types#inferbo_alloc_may_be_big) -- [INFERBO_ALLOC_MAY_BE_NEGATIVE](all-issue-types#inferbo_alloc_may_be_negative) -- [INFERBO_ALLOC_MAY_BE_TAINTED](all-issue-types#inferbo_alloc_may_be_tainted) -- [INTEGER_OVERFLOW_L1](all-issue-types#integer_overflow_l1) -- [INTEGER_OVERFLOW_L2](all-issue-types#integer_overflow_l2) -- [INTEGER_OVERFLOW_L5](all-issue-types#integer_overflow_l5) -- [INTEGER_OVERFLOW_R2](all-issue-types#integer_overflow_r2) -- [INTEGER_OVERFLOW_U5](all-issue-types#integer_overflow_u5) -- [UNREACHABLE_CODE](all-issue-types#unreachable_code) +- [BUFFER_OVERRUN_L1](/docs/next/all-issue-types#buffer_overrun_l1) +- [BUFFER_OVERRUN_L2](/docs/next/all-issue-types#buffer_overrun_l2) +- [BUFFER_OVERRUN_L3](/docs/next/all-issue-types#buffer_overrun_l3) +- [BUFFER_OVERRUN_L4](/docs/next/all-issue-types#buffer_overrun_l4) +- [BUFFER_OVERRUN_L5](/docs/next/all-issue-types#buffer_overrun_l5) +- [BUFFER_OVERRUN_R2](/docs/next/all-issue-types#buffer_overrun_r2) +- [BUFFER_OVERRUN_S2](/docs/next/all-issue-types#buffer_overrun_s2) +- [BUFFER_OVERRUN_T1](/docs/next/all-issue-types#buffer_overrun_t1) +- [BUFFER_OVERRUN_U5](/docs/next/all-issue-types#buffer_overrun_u5) +- [CONDITION_ALWAYS_FALSE](/docs/next/all-issue-types#condition_always_false) +- [CONDITION_ALWAYS_TRUE](/docs/next/all-issue-types#condition_always_true) +- [INFERBO_ALLOC_IS_BIG](/docs/next/all-issue-types#inferbo_alloc_is_big) +- [INFERBO_ALLOC_IS_NEGATIVE](/docs/next/all-issue-types#inferbo_alloc_is_negative) +- [INFERBO_ALLOC_IS_ZERO](/docs/next/all-issue-types#inferbo_alloc_is_zero) +- [INFERBO_ALLOC_MAY_BE_BIG](/docs/next/all-issue-types#inferbo_alloc_may_be_big) +- [INFERBO_ALLOC_MAY_BE_NEGATIVE](/docs/next/all-issue-types#inferbo_alloc_may_be_negative) +- [INFERBO_ALLOC_MAY_BE_TAINTED](/docs/next/all-issue-types#inferbo_alloc_may_be_tainted) +- [INTEGER_OVERFLOW_L1](/docs/next/all-issue-types#integer_overflow_l1) +- [INTEGER_OVERFLOW_L2](/docs/next/all-issue-types#integer_overflow_l2) +- [INTEGER_OVERFLOW_L5](/docs/next/all-issue-types#integer_overflow_l5) +- [INTEGER_OVERFLOW_R2](/docs/next/all-issue-types#integer_overflow_r2) +- [INTEGER_OVERFLOW_U5](/docs/next/all-issue-types#integer_overflow_u5) +- [UNREACHABLE_CODE](/docs/next/all-issue-types#unreachable_code) diff --git a/website/docs/checker-cost.md b/website/docs/checker-cost.md index 2d42999b8..a8596e1e0 100644 --- a/website/docs/checker-cost.md +++ b/website/docs/checker-cost.md @@ -34,12 +34,12 @@ The total cost of the node is the scalar product of these two vectors. Then, the At a high level, the analysis has three steps: - Choose control variables that allude to "how many times a loop may iterate". -- Get abstract ranges of the control variables from [InferBO](checker-bufferoverrun) (a numerical analysis that infers symbolic intervals) +- Get abstract ranges of the control variables from [InferBO](/docs/next/checker-bufferoverrun) (a numerical analysis that infers symbolic intervals) - Construct complexity polynomials for loops and functions by via a constraint solving algorithm. -## Examples +## Examples Infer’s cost analysis statically estimates the execution cost of a program without running the code. For instance, assume that we had the @@ -62,7 +62,7 @@ void loop(ArrayList list){ } ``` -where `foo` has a linear cost in its parameter, then Infer automatically detects that the complexity of loop has increased from `O(|list|)` to `O(|list|^2)` and then reports an [`EXECUTION_TIME_COMPLEXITY_INCREASE`](execution_time_complexity_increase) issue. +where `foo` has a linear cost in its parameter, then Infer automatically detects that the complexity of loop has increased from `O(|list|)` to `O(|list|^2)` and then reports an [`EXECUTION_TIME_COMPLEXITY_INCREASE`](/docs/next/all-issue-types#execution_time_complexity_increase) issue. @@ -72,13 +72,13 @@ Differential cost analysis in action: - first run infer's cost analysis on `File.java` and rename `costs-report.json` (which is in `/infer-out`) to `previous-costs-report.json` - modify the function as shown above - re-run infer on `File.java` and rename `costs-report.json` to `current-costs-report.json` -- run `infer reportdiff --costs-current current-costs-report.json --costs-previous current-costs-report`. +- run `infer reportdiff --costs-current current-costs-report.json --costs-previous current-costs-report`. - Inspect `infer-out/differential/introduced.json` to see the newly found complexity increase issue(s). ## Limitations -There are a number of known limitations to the design of the static cost analysis: +There are a number of known limitations to the design of the static cost analysis: - InferBo's intervals are limited to affine expressions, not full-blown polynomials. Hence, we can automatically infer bounds involving square roots. @@ -90,7 +90,7 @@ There are a number of known limitations to the design of the static cost analysi ## List of Issue Types The following issue types are reported by this checker: -- [EXECUTION_TIME_COMPLEXITY_INCREASE](all-issue-types#execution_time_complexity_increase) -- [EXECUTION_TIME_COMPLEXITY_INCREASE_UI_THREAD](all-issue-types#execution_time_complexity_increase_ui_thread) -- [EXECUTION_TIME_UNREACHABLE_AT_EXIT](all-issue-types#execution_time_unreachable_at_exit) -- [INFINITE_EXECUTION_TIME](all-issue-types#infinite_execution_time) +- [EXECUTION_TIME_COMPLEXITY_INCREASE](/docs/next/all-issue-types#execution_time_complexity_increase) +- [EXECUTION_TIME_COMPLEXITY_INCREASE_UI_THREAD](/docs/next/all-issue-types#execution_time_complexity_increase_ui_thread) +- [EXECUTION_TIME_UNREACHABLE_AT_EXIT](/docs/next/all-issue-types#execution_time_unreachable_at_exit) +- [INFINITE_EXECUTION_TIME](/docs/next/all-issue-types#infinite_execution_time) diff --git a/website/docs/checker-eradicate.md b/website/docs/checker-eradicate.md index ca0bee738..78a199147 100644 --- a/website/docs/checker-eradicate.md +++ b/website/docs/checker-eradicate.md @@ -91,11 +91,11 @@ class C { ## List of Issue Types The following issue types are reported by this checker: -- [ERADICATE_CONDITION_REDUNDANT](all-issue-types#eradicate_condition_redundant) -- [ERADICATE_FIELD_NOT_INITIALIZED](all-issue-types#eradicate_field_not_initialized) -- [ERADICATE_FIELD_NOT_NULLABLE](all-issue-types#eradicate_field_not_nullable) -- [ERADICATE_INCONSISTENT_SUBCLASS_PARAMETER_ANNOTATION](all-issue-types#eradicate_inconsistent_subclass_parameter_annotation) -- [ERADICATE_INCONSISTENT_SUBCLASS_RETURN_ANNOTATION](all-issue-types#eradicate_inconsistent_subclass_return_annotation) -- [ERADICATE_PARAMETER_NOT_NULLABLE](all-issue-types#eradicate_parameter_not_nullable) -- [ERADICATE_RETURN_NOT_NULLABLE](all-issue-types#eradicate_return_not_nullable) -- [ERADICATE_RETURN_OVER_ANNOTATED](all-issue-types#eradicate_return_over_annotated) +- [ERADICATE_CONDITION_REDUNDANT](/docs/next/all-issue-types#eradicate_condition_redundant) +- [ERADICATE_FIELD_NOT_INITIALIZED](/docs/next/all-issue-types#eradicate_field_not_initialized) +- [ERADICATE_FIELD_NOT_NULLABLE](/docs/next/all-issue-types#eradicate_field_not_nullable) +- [ERADICATE_INCONSISTENT_SUBCLASS_PARAMETER_ANNOTATION](/docs/next/all-issue-types#eradicate_inconsistent_subclass_parameter_annotation) +- [ERADICATE_INCONSISTENT_SUBCLASS_RETURN_ANNOTATION](/docs/next/all-issue-types#eradicate_inconsistent_subclass_return_annotation) +- [ERADICATE_PARAMETER_NOT_NULLABLE](/docs/next/all-issue-types#eradicate_parameter_not_nullable) +- [ERADICATE_RETURN_NOT_NULLABLE](/docs/next/all-issue-types#eradicate_return_not_nullable) +- [ERADICATE_RETURN_OVER_ANNOTATED](/docs/next/all-issue-types#eradicate_return_over_annotated) diff --git a/website/docs/checker-fragment-retains-view.md b/website/docs/checker-fragment-retains-view.md index 97ce217aa..3aa0916c2 100644 --- a/website/docs/checker-fragment-retains-view.md +++ b/website/docs/checker-fragment-retains-view.md @@ -18,4 +18,4 @@ Supported languages: ## List of Issue Types The following issue types are reported by this checker: -- [CHECKERS_FRAGMENT_RETAINS_VIEW](all-issue-types#checkers_fragment_retains_view) +- [CHECKERS_FRAGMENT_RETAINS_VIEW](/docs/next/all-issue-types#checkers_fragment_retains_view) diff --git a/website/docs/checker-immutable-cast.md b/website/docs/checker-immutable-cast.md index f2dd95808..6e066c526 100644 --- a/website/docs/checker-immutable-cast.md +++ b/website/docs/checker-immutable-cast.md @@ -18,4 +18,4 @@ Casts flagged by this checker are unsafe because calling mutation operations on ## List of Issue Types The following issue types are reported by this checker: -- [CHECKERS_IMMUTABLE_CAST](all-issue-types#checkers_immutable_cast) +- [CHECKERS_IMMUTABLE_CAST](/docs/next/all-issue-types#checkers_immutable_cast) diff --git a/website/docs/checker-impurity.md b/website/docs/checker-impurity.md new file mode 100644 index 000000000..67c25c62e --- /dev/null +++ b/website/docs/checker-impurity.md @@ -0,0 +1,20 @@ +--- +title: "Impurity" +description: "Detects functions with potential side-effects. Same as \"purity\", but implemented on top of Pulse." +--- + +Detects functions with potential side-effects. Same as "purity", but implemented on top of Pulse. + +Activate with `--impurity`. + +Supported languages: +- C/C++/ObjC: Experimental +- Java: Experimental + +This is an experimental inter-procedural analysis that detects impure functions. It is meant to be an improvement over the [purity](/docs/next/checker-purity) analysis with a negation on the issue types. For each function, impurity analysis keeps track of not only the impurity of the function but also some additional information such as which parameters/globals the function modifies. It models functions with no summary/model as impure. The analysis relies on [Pulse](/docs/next/checker-pulse) summaries to determine impurity. + + +## List of Issue Types + +The following issue types are reported by this checker: +- [IMPURE_FUNCTION](/docs/next/all-issue-types#impure_function) diff --git a/website/docs/checker-inefficient-keyset-iterator.md b/website/docs/checker-inefficient-keyset-iterator.md index d83b9de68..0fe43a474 100644 --- a/website/docs/checker-inefficient-keyset-iterator.md +++ b/website/docs/checker-inefficient-keyset-iterator.md @@ -16,4 +16,4 @@ Supported languages: ## List of Issue Types The following issue types are reported by this checker: -- [INEFFICIENT_KEYSET_ITERATOR](all-issue-types#inefficient_keyset_iterator) +- [INEFFICIENT_KEYSET_ITERATOR](/docs/next/all-issue-types#inefficient_keyset_iterator) diff --git a/website/docs/checker-linters.md b/website/docs/checker-linters.md index 75f24d6f7..8a64fc0b3 100644 --- a/website/docs/checker-linters.md +++ b/website/docs/checker-linters.md @@ -16,7 +16,7 @@ Supported languages: For C/C++ and Objective-C languages, we provide a linters framework. These are checks about the syntax of the program; it could be about a property, or about code inside one method, or that a class or method have certain properties. We -provide [a few checks](/docs/linters-bug-types) and we have developed a domain +provide [a few checks by default](#list-of-issue-types) and we have developed a domain specific language (DSL) to make it easier to write checks. ## AL: A declarative language for writing linters in Infer @@ -701,24 +701,24 @@ infer run --linters -- clang -c Test.m ``` There are a few other command-line options that are useful for using or -developing new linters in Infer. Read about them in the [`infer capture` manual](man-pages). +developing new linters in Infer. Read about them in the [`infer capture` manual](/docs/next/man-infer-capture). ## List of Issue Types The following issue types are reported by this checker: -- [ASSIGN_POINTER_WARNING](all-issue-types#assign_pointer_warning) -- [BAD_POINTER_COMPARISON](all-issue-types#bad_pointer_comparison) -- [COMPONENT_FACTORY_FUNCTION](all-issue-types#component_factory_function) -- [COMPONENT_INITIALIZER_WITH_SIDE_EFFECTS](all-issue-types#component_initializer_with_side_effects) -- [COMPONENT_WITH_MULTIPLE_FACTORY_METHODS](all-issue-types#component_with_multiple_factory_methods) -- [COMPONENT_WITH_UNCONVENTIONAL_SUPERCLASS](all-issue-types#component_with_unconventional_superclass) -- [CXX_REFERENCE_CAPTURED_IN_OBJC_BLOCK](all-issue-types#cxx_reference_captured_in_objc_block) -- [DIRECT_ATOMIC_PROPERTY_ACCESS](all-issue-types#direct_atomic_property_access) -- [DISCOURAGED_WEAK_PROPERTY_CUSTOM_SETTER](all-issue-types#discouraged_weak_property_custom_setter) -- [GLOBAL_VARIABLE_INITIALIZED_WITH_FUNCTION_OR_METHOD_CALL](all-issue-types#global_variable_initialized_with_function_or_method_call) -- [MUTABLE_LOCAL_VARIABLE_IN_COMPONENT_FILE](all-issue-types#mutable_local_variable_in_component_file) -- [POINTER_TO_CONST_OBJC_CLASS](all-issue-types#pointer_to_const_objc_class) -- [REGISTERED_OBSERVER_BEING_DEALLOCATED](all-issue-types#registered_observer_being_deallocated) -- [STRONG_DELEGATE_WARNING](all-issue-types#strong_delegate_warning) -- [UNAVAILABLE_API_IN_SUPPORTED_IOS_SDK](all-issue-types#unavailable_api_in_supported_ios_sdk) +- [ASSIGN_POINTER_WARNING](/docs/next/all-issue-types#assign_pointer_warning) +- [BAD_POINTER_COMPARISON](/docs/next/all-issue-types#bad_pointer_comparison) +- [COMPONENT_FACTORY_FUNCTION](/docs/next/all-issue-types#component_factory_function) +- [COMPONENT_INITIALIZER_WITH_SIDE_EFFECTS](/docs/next/all-issue-types#component_initializer_with_side_effects) +- [COMPONENT_WITH_MULTIPLE_FACTORY_METHODS](/docs/next/all-issue-types#component_with_multiple_factory_methods) +- [COMPONENT_WITH_UNCONVENTIONAL_SUPERCLASS](/docs/next/all-issue-types#component_with_unconventional_superclass) +- [CXX_REFERENCE_CAPTURED_IN_OBJC_BLOCK](/docs/next/all-issue-types#cxx_reference_captured_in_objc_block) +- [DIRECT_ATOMIC_PROPERTY_ACCESS](/docs/next/all-issue-types#direct_atomic_property_access) +- [DISCOURAGED_WEAK_PROPERTY_CUSTOM_SETTER](/docs/next/all-issue-types#discouraged_weak_property_custom_setter) +- [GLOBAL_VARIABLE_INITIALIZED_WITH_FUNCTION_OR_METHOD_CALL](/docs/next/all-issue-types#global_variable_initialized_with_function_or_method_call) +- [MUTABLE_LOCAL_VARIABLE_IN_COMPONENT_FILE](/docs/next/all-issue-types#mutable_local_variable_in_component_file) +- [POINTER_TO_CONST_OBJC_CLASS](/docs/next/all-issue-types#pointer_to_const_objc_class) +- [REGISTERED_OBSERVER_BEING_DEALLOCATED](/docs/next/all-issue-types#registered_observer_being_deallocated) +- [STRONG_DELEGATE_WARNING](/docs/next/all-issue-types#strong_delegate_warning) +- [UNAVAILABLE_API_IN_SUPPORTED_IOS_SDK](/docs/next/all-issue-types#unavailable_api_in_supported_ios_sdk) diff --git a/website/docs/checker-litho-required-props.md b/website/docs/checker-litho-required-props.md index c18b6153b..943d28336 100644 --- a/website/docs/checker-litho-required-props.md +++ b/website/docs/checker-litho-required-props.md @@ -1,9 +1,9 @@ --- title: "Litho \"Required Props\"" -description: "Checks that all non-option `@Prop`s have been specified when constructing Litho components." +description: "Checks that all non-optional `@Prop`s have been specified when constructing Litho components." --- -Checks that all non-option `@Prop`s have been specified when constructing Litho components. +Checks that all non-optional `@Prop`s have been specified when constructing Litho components. Activate with `--litho-required-props`. @@ -11,3 +11,60 @@ Supported languages: - C/C++/ObjC: No - Java: Yes +This analysis checks that all non-optional [`@Prop`](https://fblitho.com/docs/props)`s have been specified when constructing Litho components. This is a [Litho](https://fblitho.com/) specific checker. + + +## What are required Props? +In a nutshell, a Litho Component is essentially a class that defines immutable inputs, called prop (annotated with `@Prop`) in component hierarchy methods. For each Component there is a corresponding spec class which defines the required props:. E.g: + +```java +class MyComponentSpec { + + static void onCreate( + ComponentContext c, + @Prop(optional = true) String prop1, @Prop int prop2) { + ... + } + ... +} +``` + +`MyComponentSpec` defines two props: a String prop called `prop1` and an int prop named `prop2`. For each prop defined on the spec, the annotation processor creates a builder pattern method that has the same name as the prop. + +Developers pass down values for these props by calling the appropriate methods: + +```java +MyComponent.create(c) + .prop1("My prop 1") + .prop2(256) + .build(); +``` + +If the required props are not called, then annotation processor throws an exception in run time. This is really bad and that's where this checker comes into play to detect such cases statically. + + +## Examples + +E.g. the following is caught as [MISSING_REQUIRED_PROP](/docs/next/all-issue-types#missing_required_prop) `prop2`. + +```java +MyComponent.create(c) + .prop1("My prop 1") + .build(); +``` + +The following is ok though since `prop1` is optional. + +```java +MyComponent.create(c) + .prop2(8) + .build(); +``` + +Note that, the functions `create()` and `build()` could be defined in different methods and there could be various function calls, aliasing, and control flow patterns in between. Hence, this checker is inter-procedural. + + +## List of Issue Types + +The following issue types are reported by this checker: +- [MISSING_REQUIRED_PROP](/docs/next/all-issue-types#missing_required_prop) diff --git a/website/docs/checker-liveness.md b/website/docs/checker-liveness.md index 545238a8e..5032e3c3b 100644 --- a/website/docs/checker-liveness.md +++ b/website/docs/checker-liveness.md @@ -16,4 +16,4 @@ Supported languages: ## List of Issue Types The following issue types are reported by this checker: -- [DEAD_STORE](all-issue-types#dead_store) +- [DEAD_STORE](/docs/next/all-issue-types#dead_store) diff --git a/website/docs/checker-loop-hoisting.md b/website/docs/checker-loop-hoisting.md index 6966e5f5d..52e79ff18 100644 --- a/website/docs/checker-loop-hoisting.md +++ b/website/docs/checker-loop-hoisting.md @@ -11,3 +11,13 @@ Supported languages: - C/C++/ObjC: Yes - Java: Yes +This checker detects opportunities to hoist function calls that are invariant to outside of loop bodies. The hoisting analysis relies on [purity](/docs/next/checker-purity) analysis to determine whather a function is pure or not. + +It has an additional mode that reports [loop-invariant functions that are expensive](/docs/next/all-issue-types#expensive_loop_invariant_call) (i.e. at least linear). This is enabled by the flag `--hoisting-report-only-expensive`. + + +## List of Issue Types + +The following issue types are reported by this checker: +- [EXPENSIVE_LOOP_INVARIANT_CALL](/docs/next/all-issue-types#expensive_loop_invariant_call) +- [INVARIANT_CALL](/docs/next/all-issue-types#invariant_call) diff --git a/website/docs/checker-printf-args.md b/website/docs/checker-printf-args.md index 8c1e0fc99..b36177b76 100644 --- a/website/docs/checker-printf-args.md +++ b/website/docs/checker-printf-args.md @@ -18,4 +18,4 @@ Supported languages: ## List of Issue Types The following issue types are reported by this checker: -- [CHECKERS_PRINTF_ARGS](all-issue-types#checkers_printf_args) +- [CHECKERS_PRINTF_ARGS](/docs/next/all-issue-types#checkers_printf_args) diff --git a/website/docs/checker-pulse.md b/website/docs/checker-pulse.md index fbb7c3ab5..fe836639b 100644 --- a/website/docs/checker-pulse.md +++ b/website/docs/checker-pulse.md @@ -16,10 +16,10 @@ Supported languages: ## List of Issue Types The following issue types are reported by this checker: -- [CONSTANT_ADDRESS_DEREFERENCE](all-issue-types#constant_address_dereference) -- [MEMORY_LEAK](all-issue-types#memory_leak) -- [NULLPTR_DEREFERENCE](all-issue-types#nullptr_dereference) -- [STACK_VARIABLE_ADDRESS_ESCAPE](all-issue-types#stack_variable_address_escape) -- [USE_AFTER_DELETE](all-issue-types#use_after_delete) -- [USE_AFTER_FREE](all-issue-types#use_after_free) -- [USE_AFTER_LIFETIME](all-issue-types#use_after_lifetime) +- [CONSTANT_ADDRESS_DEREFERENCE](/docs/next/all-issue-types#constant_address_dereference) +- [MEMORY_LEAK](/docs/next/all-issue-types#memory_leak) +- [NULLPTR_DEREFERENCE](/docs/next/all-issue-types#nullptr_dereference) +- [STACK_VARIABLE_ADDRESS_ESCAPE](/docs/next/all-issue-types#stack_variable_address_escape) +- [USE_AFTER_DELETE](/docs/next/all-issue-types#use_after_delete) +- [USE_AFTER_FREE](/docs/next/all-issue-types#use_after_free) +- [USE_AFTER_LIFETIME](/docs/next/all-issue-types#use_after_lifetime) diff --git a/website/docs/checker-purity.md b/website/docs/checker-purity.md new file mode 100644 index 000000000..298063cea --- /dev/null +++ b/website/docs/checker-purity.md @@ -0,0 +1,65 @@ +--- +title: "Purity" +description: "Detects pure (side-effect-free) functions. A different implementation of \"impurity\"." +--- + +Detects pure (side-effect-free) functions. A different implementation of "impurity". + +Activate with `--purity`. + +Supported languages: +- C/C++/ObjC: Experimental +- Java: Experimental + +This is an experimental inter-procedural analysis that detects pure (side-effect free) functions. For each function, purity analysis keeps track of not only the purity of the function but also some additional information such as whether the function modifies a global variable or which of the parameters are modified. It models functions with no summary/model as modifying the global state (hence impure). + +If the function is pure (i.e. doesn't modify any global state or its parameters and doesn't call any unknown functions), then it reports an [`PURE_FUNCTION`](/docs/next/all-issue-types#pure_function) issue. + + +## Weaknesses + +There are two issues with the existing purity analysis: +- In order to detect which parameters are modified, we need an alias analysis which is difficult to get right. +- Just keeping track of modified arguments doesn't suffice. + +Too see the issue with the first point, consider the following simple program: + +```java +void foo(Foo a){ + Foo b = a; + b.x = 10; +} +``` + +in order to determine that `foo` is impure, we need to know that the write to `b`'s field is actually changing the function parameter `a`, i.e. we need to check if `b` is aliasing `a`. This is known as alias analysis and is hard to get right in a scalable manner. When this analysis was being developed, Infer didn't have a unified alias analysis and using biabduction seemed like a too daunting task at the time. Hence, we relied on [InferBo](/docs/next/checker-bufferoverrun)'s aliasing mechanism which was easy to invoke and integrate with. However, InferBo's aliasing analysis is far from perfect and causes issues for purity. +To see the issue with the second point, consider the following program: + +```java +boolean contains(Integer i, ArrayList list){ + Iterator listIterator = list.iterator(); + while(listIterator.hasNext()) { + Integer el = listIterator.next(); + if (i.equals(el)){ + return true; + } + } + return false; + } +``` + +The existing purity analysis concludes that the above function `contains` is impure because it calls an impure function `next()` which modifies the iterator (hence it thinks it also modifies the `list`). However, notice that `contains` doesn't have an observable side-effect: `list.iterator()` returns a new object, `hasNext()` and `equals()` are pure, and `next()` only modifies the fields of the fresh object `listIterator`. Therefore, `contains` should be considered as pure. + + +To alleviate this problem, we have developed an [Impurity](/docs/next/checker-impurity) analysis which uses [pulse](/docs/next/checker-pulse) which can successfully analyze this program as pure \o/ + + +The analysis is used by: + +- [Loop-hoisting](/docs/next/checker-loop-hoisting) analysis which identifies loop-invariant function calls, i.e. functions that are pure and have loop-invariant arguments. +- [Cost](/docs/next/checker-cost) analysis which identifies control variables in the loop that affect how many times a loop is executed. In this computation, we need to prune control variables that do not affect how many times a loop is executed. In this pruning step, we need to compute loop-invariant variables (which requires the above analysis). + + +## List of Issue Types + +The following issue types are reported by this checker: +- [PURE_FUNCTION](/docs/next/all-issue-types#pure_function) diff --git a/website/docs/checker-quandary.md b/website/docs/checker-quandary.md index 9312d491d..4d8d90490 100644 --- a/website/docs/checker-quandary.md +++ b/website/docs/checker-quandary.md @@ -24,25 +24,25 @@ example ## List of Issue Types The following issue types are reported by this checker: -- [CREATE_INTENT_FROM_URI](all-issue-types#create_intent_from_uri) -- [CROSS_SITE_SCRIPTING](all-issue-types#cross_site_scripting) -- [EXPOSED_INSECURE_INTENT_HANDLING](all-issue-types#exposed_insecure_intent_handling) -- [INSECURE_INTENT_HANDLING](all-issue-types#insecure_intent_handling) -- [JAVASCRIPT_INJECTION](all-issue-types#javascript_injection) -- [LOGGING_PRIVATE_DATA](all-issue-types#logging_private_data) -- [QUANDARY_TAINT_ERROR](all-issue-types#quandary_taint_error) -- [SHELL_INJECTION](all-issue-types#shell_injection) -- [SHELL_INJECTION_RISK](all-issue-types#shell_injection_risk) -- [SQL_INJECTION](all-issue-types#sql_injection) -- [SQL_INJECTION_RISK](all-issue-types#sql_injection_risk) -- [UNTRUSTED_BUFFER_ACCESS](all-issue-types#untrusted_buffer_access) -- [UNTRUSTED_DESERIALIZATION](all-issue-types#untrusted_deserialization) -- [UNTRUSTED_DESERIALIZATION_RISK](all-issue-types#untrusted_deserialization_risk) -- [UNTRUSTED_ENVIRONMENT_CHANGE_RISK](all-issue-types#untrusted_environment_change_risk) -- [UNTRUSTED_FILE](all-issue-types#untrusted_file) -- [UNTRUSTED_FILE_RISK](all-issue-types#untrusted_file_risk) -- [UNTRUSTED_HEAP_ALLOCATION](all-issue-types#untrusted_heap_allocation) -- [UNTRUSTED_INTENT_CREATION](all-issue-types#untrusted_intent_creation) -- [UNTRUSTED_URL_RISK](all-issue-types#untrusted_url_risk) -- [UNTRUSTED_VARIABLE_LENGTH_ARRAY](all-issue-types#untrusted_variable_length_array) -- [USER_CONTROLLED_SQL_RISK](all-issue-types#user_controlled_sql_risk) +- [CREATE_INTENT_FROM_URI](/docs/next/all-issue-types#create_intent_from_uri) +- [CROSS_SITE_SCRIPTING](/docs/next/all-issue-types#cross_site_scripting) +- [EXPOSED_INSECURE_INTENT_HANDLING](/docs/next/all-issue-types#exposed_insecure_intent_handling) +- [INSECURE_INTENT_HANDLING](/docs/next/all-issue-types#insecure_intent_handling) +- [JAVASCRIPT_INJECTION](/docs/next/all-issue-types#javascript_injection) +- [LOGGING_PRIVATE_DATA](/docs/next/all-issue-types#logging_private_data) +- [QUANDARY_TAINT_ERROR](/docs/next/all-issue-types#quandary_taint_error) +- [SHELL_INJECTION](/docs/next/all-issue-types#shell_injection) +- [SHELL_INJECTION_RISK](/docs/next/all-issue-types#shell_injection_risk) +- [SQL_INJECTION](/docs/next/all-issue-types#sql_injection) +- [SQL_INJECTION_RISK](/docs/next/all-issue-types#sql_injection_risk) +- [UNTRUSTED_BUFFER_ACCESS](/docs/next/all-issue-types#untrusted_buffer_access) +- [UNTRUSTED_DESERIALIZATION](/docs/next/all-issue-types#untrusted_deserialization) +- [UNTRUSTED_DESERIALIZATION_RISK](/docs/next/all-issue-types#untrusted_deserialization_risk) +- [UNTRUSTED_ENVIRONMENT_CHANGE_RISK](/docs/next/all-issue-types#untrusted_environment_change_risk) +- [UNTRUSTED_FILE](/docs/next/all-issue-types#untrusted_file) +- [UNTRUSTED_FILE_RISK](/docs/next/all-issue-types#untrusted_file_risk) +- [UNTRUSTED_HEAP_ALLOCATION](/docs/next/all-issue-types#untrusted_heap_allocation) +- [UNTRUSTED_INTENT_CREATION](/docs/next/all-issue-types#untrusted_intent_creation) +- [UNTRUSTED_URL_RISK](/docs/next/all-issue-types#untrusted_url_risk) +- [UNTRUSTED_VARIABLE_LENGTH_ARRAY](/docs/next/all-issue-types#untrusted_variable_length_array) +- [USER_CONTROLLED_SQL_RISK](/docs/next/all-issue-types#user_controlled_sql_risk) diff --git a/website/docs/checker-racerd.md b/website/docs/checker-racerd.md index 0e5d3c3c3..5796e4114 100644 --- a/website/docs/checker-racerd.md +++ b/website/docs/checker-racerd.md @@ -13,7 +13,7 @@ Supported languages: RacerD finds data races in your C++ and Java code. This page gives a more in-depth explanation of how the analysis works *for Java code*, but may be less complete than the -[Thread Safety Violation bug description page](#thread-safety-violation). +[Thread Safety Violation bug description page](/docs/next/all-issue-types#thread_safety_violation). To run the analysis, you can use plain `infer` (to run RacerD along with other analyses that are run by default) or `infer --racerd-only` (to run only RacerD). @@ -308,7 +308,7 @@ synchronized void setFWithLock() { Unlike the other annotations shown here, this one lives in [Android](https://developer.android.com/reference/android/support/annotation/VisibleForTesting.html). -## Interprocedural Reasoning +## Interprocedural Reasoning An important feature of RacerD is that it finds races by analyzing not just one file or class, but by looking at memory accesses that occur after going through @@ -409,7 +409,7 @@ Facebook engineers. [A separate blog post looked at 100 recent data race fixes](https://code.facebook.com/posts/1537144479682247/finding-inter-procedural-bugs-at-scale-with-infer-static-analyzer/) in Infer's deployment in various bug categories, and for data races observed that 53 of them were inter-file (and thus involving multiple classes). -[See above](racerd#interprocedural) for an example of RacerD's interprocedural +[See above](#interprocedural-reasoning) for an example of RacerD's interprocedural capabilities. One reaction to the challenge of developing effective static race detectors has @@ -421,14 +421,7 @@ Rust, and the use/checking of @GuardedBy annotations in [Java](https://homes.cs.washington.edu/~mernst/pubs/locking-semantics-nfm2016.pdf) including in [Google's Error Prone analyzer](https://github.com/google/error-prone/blob/master/docs/bugpattern/GuardedBy.md). -When lock annotations are present they make the analyzer's life easier, and we -have -[GuardedBy checking as part of Infer](checkers-bug-types#UNSAFE_GUARDEDBY_ACCESS) -(though separate from the race detector). Our GuardedBy checker can find some -bugs that RacerD does not (see -[this example on anonymous inner classes](checkers-bug-types#anonymous_inner)), -but the race detector finds a greater number because it can work on un-annotated -code. It is possible to have a very effective race analysis without decreeing +When lock annotations are present they make the analyzer's life easier. It is possible to have a very effective race analysis without decreeing that such annotations must be present. This was essential for our deployment, since _requiring_ lock annotations would have been a show stopper for converting many thousands of lines of code to a concurrent context. We believe that this @@ -505,7 +498,7 @@ resource. ## List of Issue Types The following issue types are reported by this checker: -- [GUARDEDBY_VIOLATION](all-issue-types#guardedby_violation) -- [INTERFACE_NOT_THREAD_SAFE](all-issue-types#interface_not_thread_safe) -- [LOCK_CONSISTENCY_VIOLATION](all-issue-types#lock_consistency_violation) -- [THREAD_SAFETY_VIOLATION](all-issue-types#thread_safety_violation) +- [GUARDEDBY_VIOLATION](/docs/next/all-issue-types#guardedby_violation) +- [INTERFACE_NOT_THREAD_SAFE](/docs/next/all-issue-types#interface_not_thread_safe) +- [LOCK_CONSISTENCY_VIOLATION](/docs/next/all-issue-types#lock_consistency_violation) +- [THREAD_SAFETY_VIOLATION](/docs/next/all-issue-types#thread_safety_violation) diff --git a/website/docs/checker-self-in-block.md b/website/docs/checker-self-in-block.md index 13a694e7b..0fd584c9e 100644 --- a/website/docs/checker-self-in-block.md +++ b/website/docs/checker-self-in-block.md @@ -16,8 +16,8 @@ Supported languages: ## List of Issue Types The following issue types are reported by this checker: -- [CAPTURED_STRONG_SELF](all-issue-types#captured_strong_self) -- [MIXED_SELF_WEAKSELF](all-issue-types#mixed_self_weakself) -- [MULTIPLE_WEAKSELF](all-issue-types#multiple_weakself) -- [STRONG_SELF_NOT_CHECKED](all-issue-types#strong_self_not_checked) -- [WEAK_SELF_IN_NO_ESCAPE_BLOCK](all-issue-types#weak_self_in_no_escape_block) +- [CAPTURED_STRONG_SELF](/docs/next/all-issue-types#captured_strong_self) +- [MIXED_SELF_WEAKSELF](/docs/next/all-issue-types#mixed_self_weakself) +- [MULTIPLE_WEAKSELF](/docs/next/all-issue-types#multiple_weakself) +- [STRONG_SELF_NOT_CHECKED](/docs/next/all-issue-types#strong_self_not_checked) +- [WEAK_SELF_IN_NO_ESCAPE_BLOCK](/docs/next/all-issue-types#weak_self_in_no_escape_block) diff --git a/website/docs/checker-siof.md b/website/docs/checker-siof.md index 51b1043a5..d47fc0d47 100644 --- a/website/docs/checker-siof.md +++ b/website/docs/checker-siof.md @@ -16,4 +16,4 @@ Supported languages: ## List of Issue Types The following issue types are reported by this checker: -- [STATIC_INITIALIZATION_ORDER_FIASCO](all-issue-types#static_initialization_order_fiasco) +- [STATIC_INITIALIZATION_ORDER_FIASCO](/docs/next/all-issue-types#static_initialization_order_fiasco) diff --git a/website/docs/checker-starvation.md b/website/docs/checker-starvation.md index 9ad475ea8..38c564d06 100644 --- a/website/docs/checker-starvation.md +++ b/website/docs/checker-starvation.md @@ -21,7 +21,7 @@ Detect several kinds of "starvation" problems: ## List of Issue Types The following issue types are reported by this checker: -- [DEADLOCK](all-issue-types#deadlock) -- [LOCKLESS_VIOLATION](all-issue-types#lockless_violation) -- [STARVATION](all-issue-types#starvation) -- [STRICT_MODE_VIOLATION](all-issue-types#strict_mode_violation) +- [DEADLOCK](/docs/next/all-issue-types#deadlock) +- [LOCKLESS_VIOLATION](/docs/next/all-issue-types#lockless_violation) +- [STARVATION](/docs/next/all-issue-types#starvation) +- [STRICT_MODE_VIOLATION](/docs/next/all-issue-types#strict_mode_violation) diff --git a/website/docs/checker-uninit.md b/website/docs/checker-uninit.md index e41370c50..4cd361940 100644 --- a/website/docs/checker-uninit.md +++ b/website/docs/checker-uninit.md @@ -16,4 +16,4 @@ Supported languages: ## List of Issue Types The following issue types are reported by this checker: -- [UNINITIALIZED_VALUE](all-issue-types#uninitialized_value) +- [UNINITIALIZED_VALUE](/docs/next/all-issue-types#uninitialized_value) diff --git a/website/static/man/next/infer-analyze.1.html b/website/static/man/next/infer-analyze.1.html index 4261168b1..55b872128 100644 --- a/website/static/man/next/infer-analyze.1.html +++ b/website/static/man/next/infer-analyze.1.html @@ -1,5 +1,5 @@ - + @@ -343,7 +343,7 @@ disable all other checkers (Conversely:

--litho-required-props

Activates: checker -litho-required-props: Checks that all non-option +litho-required-props: Checks that all non-optional ’@Prop’s have been specified when constructing Litho components. (Conversely: --no-litho-required-props)

diff --git a/website/static/man/next/infer-capture.1.html b/website/static/man/next/infer-capture.1.html index a4f799bd3..ba21405c9 100644 --- a/website/static/man/next/infer-capture.1.html +++ b/website/static/man/next/infer-capture.1.html @@ -1,5 +1,5 @@ - + diff --git a/website/static/man/next/infer-compile.1.html b/website/static/man/next/infer-compile.1.html index 75492ba88..0b14d6ce6 100644 --- a/website/static/man/next/infer-compile.1.html +++ b/website/static/man/next/infer-compile.1.html @@ -1,5 +1,5 @@ - + diff --git a/website/static/man/next/infer-explore.1.html b/website/static/man/next/infer-explore.1.html index 7b00fe7bd..bd53b3286 100644 --- a/website/static/man/next/infer-explore.1.html +++ b/website/static/man/next/infer-explore.1.html @@ -1,5 +1,5 @@ - + diff --git a/website/static/man/next/infer-help.1.html b/website/static/man/next/infer-help.1.html index 72638fa84..c6bc2c547 100644 --- a/website/static/man/next/infer-help.1.html +++ b/website/static/man/next/infer-help.1.html @@ -1,5 +1,5 @@ - + diff --git a/website/static/man/next/infer-report.1.html b/website/static/man/next/infer-report.1.html index 6ac3044f4..1523de2a9 100644 --- a/website/static/man/next/infer-report.1.html +++ b/website/static/man/next/infer-report.1.html @@ -1,5 +1,5 @@ - + @@ -176,8 +176,6 @@ Assert_failure (enabled by default),
BAD_POINTER_COMPARISON (enabled by default),
BIABDUCTION_ANALYSIS_STOPS (disabled by default),
BIABDUCTION_MEMORY_LEAK (disabled by default),
-BIABD_CONDITION_ALWAYS_FALSE (disabled by default),
-BIABD_CONDITION_ALWAYS_TRUE (disabled by default),
BUFFER_OVERRUN_L1 (enabled by default),
BUFFER_OVERRUN_L2 (enabled by default),
BUFFER_OVERRUN_L3 (enabled by default),
@@ -223,8 +221,6 @@ DANGLING_POINTER_DEREFERENCE_MAYBE (disabled by default),
DEADLOCK (enabled by default),
DEAD_STORE (enabled by default),
-DEALLOCATE_STACK_VARIABLE (enabled by default),
-DEALLOCATE_STATIC_MEMORY (enabled by default),
DIRECT_ATOMIC_PROPERTY_ACCESS (enabled by default),
DISCOURAGED_WEAK_PROPERTY_CUSTOM_SETTER (enabled by default),
@@ -311,7 +307,6 @@ default),
Missing_fld (enabled by default),
NULLPTR_DEREFERENCE (disabled by default),
NULL_DEREFERENCE (enabled by default),
-NULL_TEST_AFTER_DEREFERENCE (disabled by default),
PARAMETER_NOT_NULL_CHECKED (enabled by default),
POINTER_SIZE_MISMATCH (enabled by default),
POINTER_TO_CONST_OBJC_CLASS (enabled by default),
diff --git a/website/static/man/next/infer-reportdiff.1.html b/website/static/man/next/infer-reportdiff.1.html index 44a9a019d..5e83772fd 100644 --- a/website/static/man/next/infer-reportdiff.1.html +++ b/website/static/man/next/infer-reportdiff.1.html @@ -1,5 +1,5 @@ - + diff --git a/website/static/man/next/infer-run.1.html b/website/static/man/next/infer-run.1.html index 3dcf956d4..7d648d066 100644 --- a/website/static/man/next/infer-run.1.html +++ b/website/static/man/next/infer-run.1.html @@ -1,5 +1,5 @@ - + diff --git a/website/static/man/next/infer.1.html b/website/static/man/next/infer.1.html index 6de12fb56..f157b4db5 100644 --- a/website/static/man/next/infer.1.html +++ b/website/static/man/next/infer.1.html @@ -1,5 +1,5 @@ - + @@ -663,8 +663,6 @@ Assert_failure (enabled by default),
BAD_POINTER_COMPARISON (enabled by default),
BIABDUCTION_ANALYSIS_STOPS (disabled by default),
BIABDUCTION_MEMORY_LEAK (disabled by default),
-BIABD_CONDITION_ALWAYS_FALSE (disabled by default),
-BIABD_CONDITION_ALWAYS_TRUE (disabled by default),
BUFFER_OVERRUN_L1 (enabled by default),
BUFFER_OVERRUN_L2 (enabled by default),
BUFFER_OVERRUN_L3 (enabled by default),
@@ -710,8 +708,6 @@ DANGLING_POINTER_DEREFERENCE_MAYBE (disabled by default),
DEADLOCK (enabled by default),
DEAD_STORE (enabled by default),
-DEALLOCATE_STACK_VARIABLE (enabled by default),
-DEALLOCATE_STATIC_MEMORY (enabled by default),
DIRECT_ATOMIC_PROPERTY_ACCESS (enabled by default),
DISCOURAGED_WEAK_PROPERTY_CUSTOM_SETTER (enabled by default),
@@ -798,7 +794,6 @@ default),
Missing_fld (enabled by default),
NULLPTR_DEREFERENCE (disabled by default),
NULL_DEREFERENCE (enabled by default),
-NULL_TEST_AFTER_DEREFERENCE (disabled by default),
PARAMETER_NOT_NULL_CHECKED (enabled by default),
POINTER_SIZE_MISMATCH (enabled by default),
POINTER_TO_CONST_OBJC_CLASS (enabled by default),
@@ -1280,7 +1275,7 @@ issue types that infer might report. (Conversely: --litho-required-props

Activates: checker -litho-required-props: Checks that all non-option +litho-required-props: Checks that all non-optional ’@Prop’s have been specified when constructing Litho components. (Conversely: --no-litho-required-props)

diff --git a/website/static/odoc/next/infer/Absint/Localise/index.html b/website/static/odoc/next/infer/Absint/Localise/index.html index d68ac847d..840efcada 100644 --- a/website/static/odoc/next/infer/Absint/Localise/index.html +++ b/website/static/odoc/next/infer/Absint/Localise/index.html @@ -1,2 +1,2 @@ -Localise (infer.Absint.Localise)

Module Absint.Localise

module Tags : sig ... end
type error_desc = {
descriptions : string list;
tags : Tags.t;
dotty : string option;
}

description field of error messages

val compare_error_desc : error_desc -> error_desc -> int
val no_desc : error_desc

empty error description

val verbatim_desc : string -> error_desc

verbatim desc from a string, not to be used for user-visible descs

module BucketLevel : sig ... end
val error_desc_get_bucket : error_desc -> string option

get the bucket value of an error_desc, if any

val error_desc_set_bucket : error_desc -> string -> error_desc

set the bucket value of an error_desc

val error_desc_is_reportable_bucket : error_desc -> bool

check if the report is in a high confidence bucket

val error_desc_hash : error_desc -> int

hash function for error_desc

val error_desc_equal : error_desc -> error_desc -> bool

equality for error_desc

val pp_error_desc : Stdlib.Format.formatter -> error_desc -> unit

pretty print an error description

val error_desc_get_dotty : error_desc -> string option
type deref_str

dereference strings used to explain a dereference action in an error message

val deref_str_null : IR.Procname.t option -> deref_str

dereference strings for null dereference

val deref_str_nullable : IR.Procname.t option -> string -> deref_str

dereference strings for null dereference due to Nullable annotation

val deref_str_undef : (IR.Procname.t * IBase.Location.t) -> deref_str

dereference strings for an undefined value coming from the given procedure

val deref_str_dangling : IR.PredSymb.dangling_kind option -> deref_str

dereference strings for a dangling pointer dereference

val deref_str_array_bound : IR.IntLit.t option -> IR.IntLit.t option -> deref_str

dereference strings for an array out of bound access

val deref_str_nil_argument_in_variadic_method : IR.Procname.t -> int -> int -> deref_str

dereference strings for nonterminal nil arguments in c/objc variadic methods

val deref_str_pointer_size_mismatch : IR.Typ.t -> IR.Typ.t -> deref_str

dereference strings for a pointer size mismatch

type access =
| Last_assigned of int * bool

line, null_case_flag

| Last_accessed of int * bool

line, is_nullable flag

| Initialized_automatically
| Returned_from_call of int

type of access

val dereference_string : IR.Procname.t -> deref_str -> string -> access option -> IBase.Location.t -> error_desc
val parameter_field_not_null_checked_desc : error_desc -> IR.Exp.t -> error_desc
val is_parameter_not_null_checked_desc : error_desc -> bool
val is_field_not_null_checked_desc : error_desc -> bool
val desc_class_cast_exception : IR.Procname.t option -> string -> string -> string option -> IBase.Location.t -> error_desc
val desc_condition_always_true_false : IR.IntLit.t -> string option -> IBase.Location.t -> error_desc
val desc_deallocate_stack_variable : string -> IR.Procname.t -> IBase.Location.t -> error_desc
val desc_deallocate_static_memory : string -> IR.Procname.t -> IBase.Location.t -> error_desc
val desc_divide_by_zero : string -> IBase.Location.t -> error_desc
val desc_empty_vector_access : IR.Procname.t option -> string -> IBase.Location.t -> error_desc
val is_empty_vector_access_desc : error_desc -> bool
val desc_frontend_warning : string -> string option -> IBase.Location.t -> error_desc
val desc_leak : IR.Exp.t option -> string option -> IR.PredSymb.resource option -> IR.PredSymb.res_action option -> IBase.Location.t -> string option -> error_desc
val desc_null_test_after_dereference : string -> int -> IBase.Location.t -> error_desc
val desc_custom_error : IBase.Location.t -> error_desc

Create human-readable error description for assertion failures

type pnm_kind =
| Pnm_bounds
| Pnm_dangling

kind of precondition not met

val desc_precondition_not_met : pnm_kind option -> IR.Procname.t -> IBase.Location.t -> error_desc
val desc_retain_cycle : string -> IBase.Location.t -> string option -> error_desc
val desc_registered_observer_being_deallocated : IR.Pvar.t -> IBase.Location.t -> error_desc
val desc_skip_function : IR.Procname.t -> error_desc
val desc_inherently_dangerous_function : IR.Procname.t -> error_desc
val desc_unary_minus_applied_to_unsigned_expression : string option -> string -> IBase.Location.t -> error_desc
val desc_uninitialized_dangling_pointer_deref : deref_str -> string -> IBase.Location.t -> error_desc
val access_desc : access option -> string list
\ No newline at end of file +Localise (infer.Absint.Localise)

Module Absint.Localise

module Tags : sig ... end
type error_desc = {
descriptions : string list;
tags : Tags.t;
dotty : string option;
}

description field of error messages

val compare_error_desc : error_desc -> error_desc -> int
val no_desc : error_desc

empty error description

val verbatim_desc : string -> error_desc

verbatim desc from a string, not to be used for user-visible descs

module BucketLevel : sig ... end
val error_desc_get_bucket : error_desc -> string option

get the bucket value of an error_desc, if any

val error_desc_set_bucket : error_desc -> string -> error_desc

set the bucket value of an error_desc

val error_desc_is_reportable_bucket : error_desc -> bool

check if the report is in a high confidence bucket

val error_desc_hash : error_desc -> int

hash function for error_desc

val error_desc_equal : error_desc -> error_desc -> bool

equality for error_desc

val pp_error_desc : Stdlib.Format.formatter -> error_desc -> unit

pretty print an error description

val error_desc_get_dotty : error_desc -> string option
type deref_str

dereference strings used to explain a dereference action in an error message

val deref_str_null : IR.Procname.t option -> deref_str

dereference strings for null dereference

val deref_str_nullable : IR.Procname.t option -> string -> deref_str

dereference strings for null dereference due to Nullable annotation

val deref_str_undef : (IR.Procname.t * IBase.Location.t) -> deref_str

dereference strings for an undefined value coming from the given procedure

val deref_str_dangling : IR.PredSymb.dangling_kind option -> deref_str

dereference strings for a dangling pointer dereference

val deref_str_array_bound : IR.IntLit.t option -> IR.IntLit.t option -> deref_str

dereference strings for an array out of bound access

val deref_str_nil_argument_in_variadic_method : IR.Procname.t -> int -> int -> deref_str

dereference strings for nonterminal nil arguments in c/objc variadic methods

val deref_str_pointer_size_mismatch : IR.Typ.t -> IR.Typ.t -> deref_str

dereference strings for a pointer size mismatch

type access =
| Last_assigned of int * bool

line, null_case_flag

| Last_accessed of int * bool

line, is_nullable flag

| Initialized_automatically
| Returned_from_call of int

type of access

val dereference_string : IR.Procname.t -> deref_str -> string -> access option -> IBase.Location.t -> error_desc
val parameter_field_not_null_checked_desc : error_desc -> IR.Exp.t -> error_desc
val is_parameter_not_null_checked_desc : error_desc -> bool
val is_field_not_null_checked_desc : error_desc -> bool
val desc_class_cast_exception : IR.Procname.t option -> string -> string -> string option -> IBase.Location.t -> error_desc
val desc_condition_always_true_false : IR.IntLit.t -> string option -> IBase.Location.t -> error_desc
val desc_divide_by_zero : string -> IBase.Location.t -> error_desc
val desc_empty_vector_access : IR.Procname.t option -> string -> IBase.Location.t -> error_desc
val is_empty_vector_access_desc : error_desc -> bool
val desc_frontend_warning : string -> string option -> IBase.Location.t -> error_desc
val desc_leak : IR.Exp.t option -> string option -> IR.PredSymb.resource option -> IR.PredSymb.res_action option -> IBase.Location.t -> string option -> error_desc
val desc_custom_error : IBase.Location.t -> error_desc

Create human-readable error description for assertion failures

type pnm_kind =
| Pnm_bounds
| Pnm_dangling

kind of precondition not met

val desc_precondition_not_met : pnm_kind option -> IR.Procname.t -> IBase.Location.t -> error_desc
val desc_retain_cycle : string -> IBase.Location.t -> string option -> error_desc
val desc_registered_observer_being_deallocated : IR.Pvar.t -> IBase.Location.t -> error_desc
val desc_skip_function : IR.Procname.t -> error_desc
val desc_inherently_dangerous_function : IR.Procname.t -> error_desc
val desc_unary_minus_applied_to_unsigned_expression : string option -> string -> IBase.Location.t -> error_desc
val desc_uninitialized_dangling_pointer_deref : deref_str -> string -> IBase.Location.t -> error_desc
val access_desc : access option -> string list
\ No newline at end of file diff --git a/website/static/odoc/next/infer/Absint__Localise/index.html b/website/static/odoc/next/infer/Absint__Localise/index.html index ee9e9e44c..97d7be230 100644 --- a/website/static/odoc/next/infer/Absint__Localise/index.html +++ b/website/static/odoc/next/infer/Absint__Localise/index.html @@ -1,2 +1,2 @@ -Absint__Localise (infer.Absint__Localise)

Module Absint__Localise

module Tags : sig ... end
type error_desc = {
descriptions : string list;
tags : Tags.t;
dotty : string option;
}

description field of error messages

val compare_error_desc : error_desc -> error_desc -> int
val no_desc : error_desc

empty error description

val verbatim_desc : string -> error_desc

verbatim desc from a string, not to be used for user-visible descs

module BucketLevel : sig ... end
val error_desc_get_bucket : error_desc -> string option

get the bucket value of an error_desc, if any

val error_desc_set_bucket : error_desc -> string -> error_desc

set the bucket value of an error_desc

val error_desc_is_reportable_bucket : error_desc -> bool

check if the report is in a high confidence bucket

val error_desc_hash : error_desc -> int

hash function for error_desc

val error_desc_equal : error_desc -> error_desc -> bool

equality for error_desc

val pp_error_desc : Stdlib.Format.formatter -> error_desc -> unit

pretty print an error description

val error_desc_get_dotty : error_desc -> string option
type deref_str

dereference strings used to explain a dereference action in an error message

val deref_str_null : IR.Procname.t option -> deref_str

dereference strings for null dereference

val deref_str_nullable : IR.Procname.t option -> string -> deref_str

dereference strings for null dereference due to Nullable annotation

val deref_str_undef : (IR.Procname.t * IBase.Location.t) -> deref_str

dereference strings for an undefined value coming from the given procedure

val deref_str_dangling : IR.PredSymb.dangling_kind option -> deref_str

dereference strings for a dangling pointer dereference

val deref_str_array_bound : IR.IntLit.t option -> IR.IntLit.t option -> deref_str

dereference strings for an array out of bound access

val deref_str_nil_argument_in_variadic_method : IR.Procname.t -> int -> int -> deref_str

dereference strings for nonterminal nil arguments in c/objc variadic methods

val deref_str_pointer_size_mismatch : IR.Typ.t -> IR.Typ.t -> deref_str

dereference strings for a pointer size mismatch

type access =
| Last_assigned of int * bool

line, null_case_flag

| Last_accessed of int * bool

line, is_nullable flag

| Initialized_automatically
| Returned_from_call of int

type of access

val dereference_string : IR.Procname.t -> deref_str -> string -> access option -> IBase.Location.t -> error_desc
val parameter_field_not_null_checked_desc : error_desc -> IR.Exp.t -> error_desc
val is_parameter_not_null_checked_desc : error_desc -> bool
val is_field_not_null_checked_desc : error_desc -> bool
val desc_class_cast_exception : IR.Procname.t option -> string -> string -> string option -> IBase.Location.t -> error_desc
val desc_condition_always_true_false : IR.IntLit.t -> string option -> IBase.Location.t -> error_desc
val desc_deallocate_stack_variable : string -> IR.Procname.t -> IBase.Location.t -> error_desc
val desc_deallocate_static_memory : string -> IR.Procname.t -> IBase.Location.t -> error_desc
val desc_divide_by_zero : string -> IBase.Location.t -> error_desc
val desc_empty_vector_access : IR.Procname.t option -> string -> IBase.Location.t -> error_desc
val is_empty_vector_access_desc : error_desc -> bool
val desc_frontend_warning : string -> string option -> IBase.Location.t -> error_desc
val desc_leak : IR.Exp.t option -> string option -> IR.PredSymb.resource option -> IR.PredSymb.res_action option -> IBase.Location.t -> string option -> error_desc
val desc_null_test_after_dereference : string -> int -> IBase.Location.t -> error_desc
val desc_custom_error : IBase.Location.t -> error_desc

Create human-readable error description for assertion failures

type pnm_kind =
| Pnm_bounds
| Pnm_dangling

kind of precondition not met

val desc_precondition_not_met : pnm_kind option -> IR.Procname.t -> IBase.Location.t -> error_desc
val desc_retain_cycle : string -> IBase.Location.t -> string option -> error_desc
val desc_registered_observer_being_deallocated : IR.Pvar.t -> IBase.Location.t -> error_desc
val desc_skip_function : IR.Procname.t -> error_desc
val desc_inherently_dangerous_function : IR.Procname.t -> error_desc
val desc_unary_minus_applied_to_unsigned_expression : string option -> string -> IBase.Location.t -> error_desc
val desc_uninitialized_dangling_pointer_deref : deref_str -> string -> IBase.Location.t -> error_desc
val access_desc : access option -> string list
\ No newline at end of file +Absint__Localise (infer.Absint__Localise)

Module Absint__Localise

module Tags : sig ... end
type error_desc = {
descriptions : string list;
tags : Tags.t;
dotty : string option;
}

description field of error messages

val compare_error_desc : error_desc -> error_desc -> int
val no_desc : error_desc

empty error description

val verbatim_desc : string -> error_desc

verbatim desc from a string, not to be used for user-visible descs

module BucketLevel : sig ... end
val error_desc_get_bucket : error_desc -> string option

get the bucket value of an error_desc, if any

val error_desc_set_bucket : error_desc -> string -> error_desc

set the bucket value of an error_desc

val error_desc_is_reportable_bucket : error_desc -> bool

check if the report is in a high confidence bucket

val error_desc_hash : error_desc -> int

hash function for error_desc

val error_desc_equal : error_desc -> error_desc -> bool

equality for error_desc

val pp_error_desc : Stdlib.Format.formatter -> error_desc -> unit

pretty print an error description

val error_desc_get_dotty : error_desc -> string option
type deref_str

dereference strings used to explain a dereference action in an error message

val deref_str_null : IR.Procname.t option -> deref_str

dereference strings for null dereference

val deref_str_nullable : IR.Procname.t option -> string -> deref_str

dereference strings for null dereference due to Nullable annotation

val deref_str_undef : (IR.Procname.t * IBase.Location.t) -> deref_str

dereference strings for an undefined value coming from the given procedure

val deref_str_dangling : IR.PredSymb.dangling_kind option -> deref_str

dereference strings for a dangling pointer dereference

val deref_str_array_bound : IR.IntLit.t option -> IR.IntLit.t option -> deref_str

dereference strings for an array out of bound access

val deref_str_nil_argument_in_variadic_method : IR.Procname.t -> int -> int -> deref_str

dereference strings for nonterminal nil arguments in c/objc variadic methods

val deref_str_pointer_size_mismatch : IR.Typ.t -> IR.Typ.t -> deref_str

dereference strings for a pointer size mismatch

type access =
| Last_assigned of int * bool

line, null_case_flag

| Last_accessed of int * bool

line, is_nullable flag

| Initialized_automatically
| Returned_from_call of int

type of access

val dereference_string : IR.Procname.t -> deref_str -> string -> access option -> IBase.Location.t -> error_desc
val parameter_field_not_null_checked_desc : error_desc -> IR.Exp.t -> error_desc
val is_parameter_not_null_checked_desc : error_desc -> bool
val is_field_not_null_checked_desc : error_desc -> bool
val desc_class_cast_exception : IR.Procname.t option -> string -> string -> string option -> IBase.Location.t -> error_desc
val desc_condition_always_true_false : IR.IntLit.t -> string option -> IBase.Location.t -> error_desc
val desc_divide_by_zero : string -> IBase.Location.t -> error_desc
val desc_empty_vector_access : IR.Procname.t option -> string -> IBase.Location.t -> error_desc
val is_empty_vector_access_desc : error_desc -> bool
val desc_frontend_warning : string -> string option -> IBase.Location.t -> error_desc
val desc_leak : IR.Exp.t option -> string option -> IR.PredSymb.resource option -> IR.PredSymb.res_action option -> IBase.Location.t -> string option -> error_desc
val desc_custom_error : IBase.Location.t -> error_desc

Create human-readable error description for assertion failures

type pnm_kind =
| Pnm_bounds
| Pnm_dangling

kind of precondition not met

val desc_precondition_not_met : pnm_kind option -> IR.Procname.t -> IBase.Location.t -> error_desc
val desc_retain_cycle : string -> IBase.Location.t -> string option -> error_desc
val desc_registered_observer_being_deallocated : IR.Pvar.t -> IBase.Location.t -> error_desc
val desc_skip_function : IR.Procname.t -> error_desc
val desc_inherently_dangerous_function : IR.Procname.t -> error_desc
val desc_unary_minus_applied_to_unsigned_expression : string option -> string -> IBase.Location.t -> error_desc
val desc_uninitialized_dangling_pointer_deref : deref_str -> string -> IBase.Location.t -> error_desc
val access_desc : access option -> string list
\ No newline at end of file diff --git a/website/static/odoc/next/infer/Biabduction/Errdesc/index.html b/website/static/odoc/next/infer/Biabduction/Errdesc/index.html index 2f6f95065..b7dcfa6a6 100644 --- a/website/static/odoc/next/infer/Biabduction/Errdesc/index.html +++ b/website/static/odoc/next/infer/Biabduction/Errdesc/index.html @@ -1,2 +1,2 @@ -Errdesc (infer.Biabduction.Errdesc)

Module Biabduction.Errdesc

val vpath_find : IR.Tenv.t -> 'a Prop.t -> IR.Exp.t -> IR.DecompiledExp.vpath * IR.Typ.t option

find the dexp, if any, where the given value is stored also return the type of the value if found

val hpred_is_open_resource : IR.Tenv.t -> 'a Prop.t -> Predicates.hpred -> IR.PredSymb.resource option

Check whether the hpred is a |-> representing a resource in the Racquire state

val find_ident_assignment : IR.Procdesc.Node.t -> IR.Ident.t -> (IR.Procdesc.Node.t * IR.Exp.t) option

Find a program variable assignment to id in the current node or predecessors.

val exp_rv_dexp : IR.Tenv.t -> IR.Procdesc.Node.t -> IR.Exp.t -> IR.DecompiledExp.t option

describe rvalue e as a dexp

val explain_array_access : IR.Procname.t -> IR.Tenv.t -> Absint.Localise.deref_str -> 'a Prop.t -> IBase.Location.t -> Absint.Localise.error_desc

Produce a description of the array access performed in the current instruction, if any.

val explain_class_cast_exception : IR.Tenv.t -> IR.Procname.t option -> IR.Exp.t -> IR.Exp.t -> IR.Exp.t -> IR.Procdesc.Node.t -> IBase.Location.t -> Absint.Localise.error_desc

explain a class cast exception

val explain_deallocate_stack_var : IR.Pvar.t -> IR.PredSymb.res_action -> Absint.Localise.error_desc

Explain a deallocate stack variable error

val explain_deallocate_constant_string : string -> IR.PredSymb.res_action -> Absint.Localise.error_desc

Explain a deallocate constant string error

val explain_dereference : IR.Procname.t -> IR.Tenv.t -> ?⁠use_buckets:bool -> ?⁠is_nullable:bool -> ?⁠is_premature_nil:bool -> Absint.Localise.deref_str -> 'a Prop.t -> IBase.Location.t -> Absint.Localise.error_desc

Produce a description of which expression is dereferenced in the current instruction, if any.

val explain_dereference_as_caller_expression : IR.Procname.t -> IR.Tenv.t -> ?⁠use_buckets:bool -> Absint.Localise.deref_str -> 'a Prop.t -> 'b Prop.t -> IR.Exp.t -> IR.Procdesc.Node.t -> IBase.Location.t -> IR.Pvar.t list -> Absint.Localise.error_desc

return a description explaining value exp in prop in terms of a source expression using the formal parameters of the call

val explain_divide_by_zero : IR.Tenv.t -> IR.Exp.t -> IR.Procdesc.Node.t -> IBase.Location.t -> Absint.Localise.error_desc

explain a division by zero

val explain_condition_always_true_false : IR.Tenv.t -> IR.IntLit.t -> IR.Exp.t -> IR.Procdesc.Node.t -> IBase.Location.t -> Absint.Localise.error_desc

explain a condition which is always true or false

val explain_unary_minus_applied_to_unsigned_expression : IR.Tenv.t -> IR.Exp.t -> IR.Typ.t -> IR.Procdesc.Node.t -> IBase.Location.t -> Absint.Localise.error_desc

explain unary minus applied to unsigned expression

val explain_leak : IR.Tenv.t -> Predicates.hpred -> 'a Prop.t -> IR.PredSymb.t option -> string option -> bool * Absint.Localise.error_desc

Produce a description of a leak by looking at the current state. If the current instruction is a variable nullify, blame the variable. If it is an abstraction, blame any variable nullify at the current node. If there is an alloc attribute, print the function call and line number.

val explain_null_test_after_dereference : IR.Tenv.t -> IR.Exp.t -> IR.Procdesc.Node.t -> int -> IBase.Location.t -> Absint.Localise.error_desc

explain a test for NULL of a dereferenced pointer

val warning_err : IBase.Location.t -> ('a, Stdlib.Format.formatter, unit) IStdlib.IStd.format -> 'a

warn at the given location

val find_outermost_dereference : IR.Tenv.t -> IR.Procdesc.Node.t -> IR.Exp.t -> IR.DecompiledExp.t option
val access_opt : ?⁠is_nullable:bool -> Predicates.inst -> Absint.Localise.access option
\ No newline at end of file +Errdesc (infer.Biabduction.Errdesc)

Module Biabduction.Errdesc

val vpath_find : IR.Tenv.t -> 'a Prop.t -> IR.Exp.t -> IR.DecompiledExp.vpath * IR.Typ.t option

find the dexp, if any, where the given value is stored also return the type of the value if found

val hpred_is_open_resource : IR.Tenv.t -> 'a Prop.t -> Predicates.hpred -> IR.PredSymb.resource option

Check whether the hpred is a |-> representing a resource in the Racquire state

val find_ident_assignment : IR.Procdesc.Node.t -> IR.Ident.t -> (IR.Procdesc.Node.t * IR.Exp.t) option

Find a program variable assignment to id in the current node or predecessors.

val exp_rv_dexp : IR.Tenv.t -> IR.Procdesc.Node.t -> IR.Exp.t -> IR.DecompiledExp.t option

describe rvalue e as a dexp

val explain_array_access : IR.Procname.t -> IR.Tenv.t -> Absint.Localise.deref_str -> 'a Prop.t -> IBase.Location.t -> Absint.Localise.error_desc

Produce a description of the array access performed in the current instruction, if any.

val explain_class_cast_exception : IR.Tenv.t -> IR.Procname.t option -> IR.Exp.t -> IR.Exp.t -> IR.Exp.t -> IR.Procdesc.Node.t -> IBase.Location.t -> Absint.Localise.error_desc

explain a class cast exception

val explain_dereference : IR.Procname.t -> IR.Tenv.t -> ?⁠use_buckets:bool -> ?⁠is_nullable:bool -> ?⁠is_premature_nil:bool -> Absint.Localise.deref_str -> 'a Prop.t -> IBase.Location.t -> Absint.Localise.error_desc

Produce a description of which expression is dereferenced in the current instruction, if any.

val explain_dereference_as_caller_expression : IR.Procname.t -> IR.Tenv.t -> ?⁠use_buckets:bool -> Absint.Localise.deref_str -> 'a Prop.t -> 'b Prop.t -> IR.Exp.t -> IR.Procdesc.Node.t -> IBase.Location.t -> IR.Pvar.t list -> Absint.Localise.error_desc

return a description explaining value exp in prop in terms of a source expression using the formal parameters of the call

val explain_divide_by_zero : IR.Tenv.t -> IR.Exp.t -> IR.Procdesc.Node.t -> IBase.Location.t -> Absint.Localise.error_desc

explain a division by zero

val explain_condition_always_true_false : IR.Tenv.t -> IR.IntLit.t -> IR.Exp.t -> IR.Procdesc.Node.t -> IBase.Location.t -> Absint.Localise.error_desc

explain a condition which is always true or false

val explain_unary_minus_applied_to_unsigned_expression : IR.Tenv.t -> IR.Exp.t -> IR.Typ.t -> IR.Procdesc.Node.t -> IBase.Location.t -> Absint.Localise.error_desc

explain unary minus applied to unsigned expression

val explain_leak : IR.Tenv.t -> Predicates.hpred -> 'a Prop.t -> IR.PredSymb.t option -> string option -> bool * Absint.Localise.error_desc

Produce a description of a leak by looking at the current state. If the current instruction is a variable nullify, blame the variable. If it is an abstraction, blame any variable nullify at the current node. If there is an alloc attribute, print the function call and line number.

val warning_err : IBase.Location.t -> ('a, Stdlib.Format.formatter, unit) IStdlib.IStd.format -> 'a

warn at the given location

val find_outermost_dereference : IR.Tenv.t -> IR.Procdesc.Node.t -> IR.Exp.t -> IR.DecompiledExp.t option
val access_opt : ?⁠is_nullable:bool -> Predicates.inst -> Absint.Localise.access option
\ No newline at end of file diff --git a/website/static/odoc/next/infer/Biabduction/Exceptions/index.html b/website/static/odoc/next/infer/Biabduction/Exceptions/index.html index a1d99217e..c00c2b38f 100644 --- a/website/static/odoc/next/infer/Biabduction/Exceptions/index.html +++ b/website/static/odoc/next/infer/Biabduction/Exceptions/index.html @@ -1,2 +1,2 @@ -Exceptions (infer.Biabduction.Exceptions)

Module Biabduction.Exceptions

Biabduction uses exceptions to store issues in summaries

exception Abduction_case_not_implemented of IBase.Logging.ocaml_pos
exception Analysis_stops of Absint.Localise.error_desc * IBase.Logging.ocaml_pos option
exception Array_of_pointsto of IBase.Logging.ocaml_pos
exception Array_out_of_bounds_l1 of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Array_out_of_bounds_l2 of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Array_out_of_bounds_l3 of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Bad_footprint of IBase.Logging.ocaml_pos
exception Cannot_star of IBase.Logging.ocaml_pos
exception Class_cast_exception of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Condition_always_true_false of Absint.Localise.error_desc * bool * IBase.Logging.ocaml_pos
exception Custom_error of string * IBase.IssueType.severity * Absint.Localise.error_desc
exception Dangling_pointer_dereference of bool * Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Deallocate_stack_variable of Absint.Localise.error_desc
exception Deallocate_static_memory of Absint.Localise.error_desc
exception Divide_by_zero of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Field_not_null_checked of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Empty_vector_access of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Inherently_dangerous_function of Absint.Localise.error_desc
exception Internal_error of Absint.Localise.error_desc
exception Leak of bool * bool * Absint.Localise.error_desc * bool * IR.PredSymb.resource * IBase.Logging.ocaml_pos
exception Missing_fld of IR.Fieldname.t * IBase.Logging.ocaml_pos
exception Premature_nil_termination of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Null_dereference of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Null_test_after_dereference of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Parameter_not_null_checked of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Pointer_size_mismatch of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Precondition_not_found of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Precondition_not_met of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Retain_cycle of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Registered_observer_being_deallocated of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Skip_function of Absint.Localise.error_desc
exception Skip_pointer_dereference of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Symexec_memory_error of IBase.Logging.ocaml_pos
exception Unary_minus_applied_to_unsigned_expression of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Wrong_argument_number of IBase.Logging.ocaml_pos
val handle_exception : exn -> bool

Return true if the exception is not serious and should be handled in timeout mode

val print_exception_html : string -> exn -> unit

print a description of the exception to the html output

val recognize_exception : exn -> Absint.IssueToReport.t
\ No newline at end of file +Exceptions (infer.Biabduction.Exceptions)

Module Biabduction.Exceptions

Biabduction uses exceptions to store issues in summaries

exception Abduction_case_not_implemented of IBase.Logging.ocaml_pos
exception Analysis_stops of Absint.Localise.error_desc * IBase.Logging.ocaml_pos option
exception Array_of_pointsto of IBase.Logging.ocaml_pos
exception Array_out_of_bounds_l1 of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Array_out_of_bounds_l2 of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Array_out_of_bounds_l3 of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Bad_footprint of IBase.Logging.ocaml_pos
exception Cannot_star of IBase.Logging.ocaml_pos
exception Class_cast_exception of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Custom_error of string * IBase.IssueType.severity * Absint.Localise.error_desc
exception Dangling_pointer_dereference of bool * Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Divide_by_zero of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Field_not_null_checked of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Empty_vector_access of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Inherently_dangerous_function of Absint.Localise.error_desc
exception Internal_error of Absint.Localise.error_desc
exception Leak of bool * bool * Absint.Localise.error_desc * bool * IR.PredSymb.resource * IBase.Logging.ocaml_pos
exception Missing_fld of IR.Fieldname.t * IBase.Logging.ocaml_pos
exception Premature_nil_termination of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Null_dereference of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Parameter_not_null_checked of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Pointer_size_mismatch of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Precondition_not_found of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Precondition_not_met of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Retain_cycle of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Registered_observer_being_deallocated of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Skip_function of Absint.Localise.error_desc
exception Skip_pointer_dereference of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Symexec_memory_error of IBase.Logging.ocaml_pos
exception Unary_minus_applied_to_unsigned_expression of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Wrong_argument_number of IBase.Logging.ocaml_pos
val handle_exception : exn -> bool

Return true if the exception is not serious and should be handled in timeout mode

val print_exception_html : string -> exn -> unit

print a description of the exception to the html output

val recognize_exception : exn -> Absint.IssueToReport.t
\ No newline at end of file diff --git a/website/static/odoc/next/infer/Biabduction/Tabulation/index.html b/website/static/odoc/next/infer/Biabduction/Tabulation/index.html index 06e7c348e..593bc5efd 100644 --- a/website/static/odoc/next/infer/Biabduction/Tabulation/index.html +++ b/website/static/odoc/next/infer/Biabduction/Tabulation/index.html @@ -1,2 +1,2 @@ -Tabulation (infer.Biabduction.Tabulation)

Module Biabduction.Tabulation

val remove_constant_string_class : IR.Tenv.t -> 'a Prop.t -> Prop.normal Prop.t

Remove constant string or class from a prop

val find_dereference_without_null_check_in_sexp : Predicates.strexp -> (int * IR.PredSymb.path_pos) option

Check whether a sexp contains a dereference without null check, and return the line number and path position

val create_cast_exception : IR.Tenv.t -> IBase.Logging.ocaml_pos -> IR.Procname.t option -> IR.Exp.t -> IR.Exp.t -> IR.Exp.t -> exn

raise a cast exception

val prop_is_exn : IR.Procname.t -> 'a Prop.t -> bool

check if a prop is an exception

val prop_get_exn_name : IR.Procname.t -> 'a Prop.t -> IR.Typ.Name.t option

when prop is an exception, return the exception name

val lookup_custom_errors : 'a Prop.t -> string option

search in prop contains an error state

val exe_function_call : BiabductionSummary.t Absint.InterproceduralAnalysis.t -> callee_attributes:IR.ProcAttributes.t -> callee_pname:IR.Procname.t -> callee_summary:BiabductionSummary.t -> ret_id:IR.Ident.t -> IBase.Location.t -> actuals:(IR.Exp.t * IR.Typ.t) list -> Prop.normal Prop.t -> Paths.Path.t -> (Prop.normal Prop.t * Paths.Path.t) list

Execute the function call and return the list of results with return value

\ No newline at end of file +Tabulation (infer.Biabduction.Tabulation)

Module Biabduction.Tabulation

val remove_constant_string_class : IR.Tenv.t -> 'a Prop.t -> Prop.normal Prop.t

Remove constant string or class from a prop

val create_cast_exception : IR.Tenv.t -> IBase.Logging.ocaml_pos -> IR.Procname.t option -> IR.Exp.t -> IR.Exp.t -> IR.Exp.t -> exn

raise a cast exception

val prop_is_exn : IR.Procname.t -> 'a Prop.t -> bool

check if a prop is an exception

val prop_get_exn_name : IR.Procname.t -> 'a Prop.t -> IR.Typ.Name.t option

when prop is an exception, return the exception name

val lookup_custom_errors : 'a Prop.t -> string option

search in prop contains an error state

val exe_function_call : BiabductionSummary.t Absint.InterproceduralAnalysis.t -> callee_attributes:IR.ProcAttributes.t -> callee_pname:IR.Procname.t -> callee_summary:BiabductionSummary.t -> ret_id:IR.Ident.t -> IBase.Location.t -> actuals:(IR.Exp.t * IR.Typ.t) list -> Prop.normal Prop.t -> Paths.Path.t -> (Prop.normal Prop.t * Paths.Path.t) list

Execute the function call and return the list of results with return value

\ No newline at end of file diff --git a/website/static/odoc/next/infer/Biabduction__Errdesc/index.html b/website/static/odoc/next/infer/Biabduction__Errdesc/index.html index 4a157a6de..89c4d5563 100644 --- a/website/static/odoc/next/infer/Biabduction__Errdesc/index.html +++ b/website/static/odoc/next/infer/Biabduction__Errdesc/index.html @@ -1,2 +1,2 @@ -Biabduction__Errdesc (infer.Biabduction__Errdesc)

Module Biabduction__Errdesc

val vpath_find : IR.Tenv.t -> 'a Biabduction.Prop.t -> IR.Exp.t -> IR.DecompiledExp.vpath * IR.Typ.t option

find the dexp, if any, where the given value is stored also return the type of the value if found

val hpred_is_open_resource : IR.Tenv.t -> 'a Biabduction.Prop.t -> Biabduction.Predicates.hpred -> IR.PredSymb.resource option

Check whether the hpred is a |-> representing a resource in the Racquire state

val find_ident_assignment : IR.Procdesc.Node.t -> IR.Ident.t -> (IR.Procdesc.Node.t * IR.Exp.t) option

Find a program variable assignment to id in the current node or predecessors.

val exp_rv_dexp : IR.Tenv.t -> IR.Procdesc.Node.t -> IR.Exp.t -> IR.DecompiledExp.t option

describe rvalue e as a dexp

val explain_array_access : IR.Procname.t -> IR.Tenv.t -> Absint.Localise.deref_str -> 'a Biabduction.Prop.t -> IBase.Location.t -> Absint.Localise.error_desc

Produce a description of the array access performed in the current instruction, if any.

val explain_class_cast_exception : IR.Tenv.t -> IR.Procname.t option -> IR.Exp.t -> IR.Exp.t -> IR.Exp.t -> IR.Procdesc.Node.t -> IBase.Location.t -> Absint.Localise.error_desc

explain a class cast exception

val explain_deallocate_stack_var : IR.Pvar.t -> IR.PredSymb.res_action -> Absint.Localise.error_desc

Explain a deallocate stack variable error

val explain_deallocate_constant_string : string -> IR.PredSymb.res_action -> Absint.Localise.error_desc

Explain a deallocate constant string error

val explain_dereference : IR.Procname.t -> IR.Tenv.t -> ?⁠use_buckets:bool -> ?⁠is_nullable:bool -> ?⁠is_premature_nil:bool -> Absint.Localise.deref_str -> 'a Biabduction.Prop.t -> IBase.Location.t -> Absint.Localise.error_desc

Produce a description of which expression is dereferenced in the current instruction, if any.

val explain_dereference_as_caller_expression : IR.Procname.t -> IR.Tenv.t -> ?⁠use_buckets:bool -> Absint.Localise.deref_str -> 'a Biabduction.Prop.t -> 'b Biabduction.Prop.t -> IR.Exp.t -> IR.Procdesc.Node.t -> IBase.Location.t -> IR.Pvar.t list -> Absint.Localise.error_desc

return a description explaining value exp in prop in terms of a source expression using the formal parameters of the call

val explain_divide_by_zero : IR.Tenv.t -> IR.Exp.t -> IR.Procdesc.Node.t -> IBase.Location.t -> Absint.Localise.error_desc

explain a division by zero

val explain_condition_always_true_false : IR.Tenv.t -> IR.IntLit.t -> IR.Exp.t -> IR.Procdesc.Node.t -> IBase.Location.t -> Absint.Localise.error_desc

explain a condition which is always true or false

val explain_unary_minus_applied_to_unsigned_expression : IR.Tenv.t -> IR.Exp.t -> IR.Typ.t -> IR.Procdesc.Node.t -> IBase.Location.t -> Absint.Localise.error_desc

explain unary minus applied to unsigned expression

val explain_leak : IR.Tenv.t -> Biabduction.Predicates.hpred -> 'a Biabduction.Prop.t -> IR.PredSymb.t option -> string option -> bool * Absint.Localise.error_desc

Produce a description of a leak by looking at the current state. If the current instruction is a variable nullify, blame the variable. If it is an abstraction, blame any variable nullify at the current node. If there is an alloc attribute, print the function call and line number.

val explain_null_test_after_dereference : IR.Tenv.t -> IR.Exp.t -> IR.Procdesc.Node.t -> int -> IBase.Location.t -> Absint.Localise.error_desc

explain a test for NULL of a dereferenced pointer

val warning_err : IBase.Location.t -> ('a, Stdlib.Format.formatter, unit) IStdlib.IStd.format -> 'a

warn at the given location

val find_outermost_dereference : IR.Tenv.t -> IR.Procdesc.Node.t -> IR.Exp.t -> IR.DecompiledExp.t option
val access_opt : ?⁠is_nullable:bool -> Biabduction.Predicates.inst -> Absint.Localise.access option
\ No newline at end of file +Biabduction__Errdesc (infer.Biabduction__Errdesc)

Module Biabduction__Errdesc

val vpath_find : IR.Tenv.t -> 'a Biabduction.Prop.t -> IR.Exp.t -> IR.DecompiledExp.vpath * IR.Typ.t option

find the dexp, if any, where the given value is stored also return the type of the value if found

val hpred_is_open_resource : IR.Tenv.t -> 'a Biabduction.Prop.t -> Biabduction.Predicates.hpred -> IR.PredSymb.resource option

Check whether the hpred is a |-> representing a resource in the Racquire state

val find_ident_assignment : IR.Procdesc.Node.t -> IR.Ident.t -> (IR.Procdesc.Node.t * IR.Exp.t) option

Find a program variable assignment to id in the current node or predecessors.

val exp_rv_dexp : IR.Tenv.t -> IR.Procdesc.Node.t -> IR.Exp.t -> IR.DecompiledExp.t option

describe rvalue e as a dexp

val explain_array_access : IR.Procname.t -> IR.Tenv.t -> Absint.Localise.deref_str -> 'a Biabduction.Prop.t -> IBase.Location.t -> Absint.Localise.error_desc

Produce a description of the array access performed in the current instruction, if any.

val explain_class_cast_exception : IR.Tenv.t -> IR.Procname.t option -> IR.Exp.t -> IR.Exp.t -> IR.Exp.t -> IR.Procdesc.Node.t -> IBase.Location.t -> Absint.Localise.error_desc

explain a class cast exception

val explain_dereference : IR.Procname.t -> IR.Tenv.t -> ?⁠use_buckets:bool -> ?⁠is_nullable:bool -> ?⁠is_premature_nil:bool -> Absint.Localise.deref_str -> 'a Biabduction.Prop.t -> IBase.Location.t -> Absint.Localise.error_desc

Produce a description of which expression is dereferenced in the current instruction, if any.

val explain_dereference_as_caller_expression : IR.Procname.t -> IR.Tenv.t -> ?⁠use_buckets:bool -> Absint.Localise.deref_str -> 'a Biabduction.Prop.t -> 'b Biabduction.Prop.t -> IR.Exp.t -> IR.Procdesc.Node.t -> IBase.Location.t -> IR.Pvar.t list -> Absint.Localise.error_desc

return a description explaining value exp in prop in terms of a source expression using the formal parameters of the call

val explain_divide_by_zero : IR.Tenv.t -> IR.Exp.t -> IR.Procdesc.Node.t -> IBase.Location.t -> Absint.Localise.error_desc

explain a division by zero

val explain_condition_always_true_false : IR.Tenv.t -> IR.IntLit.t -> IR.Exp.t -> IR.Procdesc.Node.t -> IBase.Location.t -> Absint.Localise.error_desc

explain a condition which is always true or false

val explain_unary_minus_applied_to_unsigned_expression : IR.Tenv.t -> IR.Exp.t -> IR.Typ.t -> IR.Procdesc.Node.t -> IBase.Location.t -> Absint.Localise.error_desc

explain unary minus applied to unsigned expression

val explain_leak : IR.Tenv.t -> Biabduction.Predicates.hpred -> 'a Biabduction.Prop.t -> IR.PredSymb.t option -> string option -> bool * Absint.Localise.error_desc

Produce a description of a leak by looking at the current state. If the current instruction is a variable nullify, blame the variable. If it is an abstraction, blame any variable nullify at the current node. If there is an alloc attribute, print the function call and line number.

val warning_err : IBase.Location.t -> ('a, Stdlib.Format.formatter, unit) IStdlib.IStd.format -> 'a

warn at the given location

val find_outermost_dereference : IR.Tenv.t -> IR.Procdesc.Node.t -> IR.Exp.t -> IR.DecompiledExp.t option
val access_opt : ?⁠is_nullable:bool -> Biabduction.Predicates.inst -> Absint.Localise.access option
\ No newline at end of file diff --git a/website/static/odoc/next/infer/Biabduction__Exceptions/index.html b/website/static/odoc/next/infer/Biabduction__Exceptions/index.html index c31cdebf8..f78751365 100644 --- a/website/static/odoc/next/infer/Biabduction__Exceptions/index.html +++ b/website/static/odoc/next/infer/Biabduction__Exceptions/index.html @@ -1,2 +1,2 @@ -Biabduction__Exceptions (infer.Biabduction__Exceptions)

Module Biabduction__Exceptions

Biabduction uses exceptions to store issues in summaries

exception Abduction_case_not_implemented of IBase.Logging.ocaml_pos
exception Analysis_stops of Absint.Localise.error_desc * IBase.Logging.ocaml_pos option
exception Array_of_pointsto of IBase.Logging.ocaml_pos
exception Array_out_of_bounds_l1 of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Array_out_of_bounds_l2 of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Array_out_of_bounds_l3 of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Bad_footprint of IBase.Logging.ocaml_pos
exception Cannot_star of IBase.Logging.ocaml_pos
exception Class_cast_exception of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Condition_always_true_false of Absint.Localise.error_desc * bool * IBase.Logging.ocaml_pos
exception Custom_error of string * IBase.IssueType.severity * Absint.Localise.error_desc
exception Dangling_pointer_dereference of bool * Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Deallocate_stack_variable of Absint.Localise.error_desc
exception Deallocate_static_memory of Absint.Localise.error_desc
exception Divide_by_zero of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Field_not_null_checked of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Empty_vector_access of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Inherently_dangerous_function of Absint.Localise.error_desc
exception Internal_error of Absint.Localise.error_desc
exception Leak of bool * bool * Absint.Localise.error_desc * bool * IR.PredSymb.resource * IBase.Logging.ocaml_pos
exception Missing_fld of IR.Fieldname.t * IBase.Logging.ocaml_pos
exception Premature_nil_termination of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Null_dereference of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Null_test_after_dereference of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Parameter_not_null_checked of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Pointer_size_mismatch of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Precondition_not_found of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Precondition_not_met of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Retain_cycle of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Registered_observer_being_deallocated of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Skip_function of Absint.Localise.error_desc
exception Skip_pointer_dereference of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Symexec_memory_error of IBase.Logging.ocaml_pos
exception Unary_minus_applied_to_unsigned_expression of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Wrong_argument_number of IBase.Logging.ocaml_pos
val handle_exception : exn -> bool

Return true if the exception is not serious and should be handled in timeout mode

val print_exception_html : string -> exn -> unit

print a description of the exception to the html output

val recognize_exception : exn -> Absint.IssueToReport.t
\ No newline at end of file +Biabduction__Exceptions (infer.Biabduction__Exceptions)

Module Biabduction__Exceptions

Biabduction uses exceptions to store issues in summaries

exception Abduction_case_not_implemented of IBase.Logging.ocaml_pos
exception Analysis_stops of Absint.Localise.error_desc * IBase.Logging.ocaml_pos option
exception Array_of_pointsto of IBase.Logging.ocaml_pos
exception Array_out_of_bounds_l1 of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Array_out_of_bounds_l2 of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Array_out_of_bounds_l3 of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Bad_footprint of IBase.Logging.ocaml_pos
exception Cannot_star of IBase.Logging.ocaml_pos
exception Class_cast_exception of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Custom_error of string * IBase.IssueType.severity * Absint.Localise.error_desc
exception Dangling_pointer_dereference of bool * Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Divide_by_zero of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Field_not_null_checked of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Empty_vector_access of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Inherently_dangerous_function of Absint.Localise.error_desc
exception Internal_error of Absint.Localise.error_desc
exception Leak of bool * bool * Absint.Localise.error_desc * bool * IR.PredSymb.resource * IBase.Logging.ocaml_pos
exception Missing_fld of IR.Fieldname.t * IBase.Logging.ocaml_pos
exception Premature_nil_termination of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Null_dereference of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Parameter_not_null_checked of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Pointer_size_mismatch of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Precondition_not_found of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Precondition_not_met of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Retain_cycle of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Registered_observer_being_deallocated of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Skip_function of Absint.Localise.error_desc
exception Skip_pointer_dereference of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Symexec_memory_error of IBase.Logging.ocaml_pos
exception Unary_minus_applied_to_unsigned_expression of Absint.Localise.error_desc * IBase.Logging.ocaml_pos
exception Wrong_argument_number of IBase.Logging.ocaml_pos
val handle_exception : exn -> bool

Return true if the exception is not serious and should be handled in timeout mode

val print_exception_html : string -> exn -> unit

print a description of the exception to the html output

val recognize_exception : exn -> Absint.IssueToReport.t
\ No newline at end of file diff --git a/website/static/odoc/next/infer/Biabduction__Tabulation/index.html b/website/static/odoc/next/infer/Biabduction__Tabulation/index.html index 52ec0a83e..54762727a 100644 --- a/website/static/odoc/next/infer/Biabduction__Tabulation/index.html +++ b/website/static/odoc/next/infer/Biabduction__Tabulation/index.html @@ -1,2 +1,2 @@ -Biabduction__Tabulation (infer.Biabduction__Tabulation)

Module Biabduction__Tabulation

val remove_constant_string_class : IR.Tenv.t -> 'a Biabduction.Prop.t -> Biabduction.Prop.normal Biabduction.Prop.t

Remove constant string or class from a prop

val find_dereference_without_null_check_in_sexp : Biabduction.Predicates.strexp -> (int * IR.PredSymb.path_pos) option

Check whether a sexp contains a dereference without null check, and return the line number and path position

val create_cast_exception : IR.Tenv.t -> IBase.Logging.ocaml_pos -> IR.Procname.t option -> IR.Exp.t -> IR.Exp.t -> IR.Exp.t -> exn

raise a cast exception

val prop_is_exn : IR.Procname.t -> 'a Biabduction.Prop.t -> bool

check if a prop is an exception

val prop_get_exn_name : IR.Procname.t -> 'a Biabduction.Prop.t -> IR.Typ.Name.t option

when prop is an exception, return the exception name

val lookup_custom_errors : 'a Biabduction.Prop.t -> string option

search in prop contains an error state

val exe_function_call : Biabduction.BiabductionSummary.t Absint.InterproceduralAnalysis.t -> callee_attributes:IR.ProcAttributes.t -> callee_pname:IR.Procname.t -> callee_summary:Biabduction.BiabductionSummary.t -> ret_id:IR.Ident.t -> IBase.Location.t -> actuals:(IR.Exp.t * IR.Typ.t) list -> Biabduction.Prop.normal Biabduction.Prop.t -> Biabduction.Paths.Path.t -> (Biabduction.Prop.normal Biabduction.Prop.t * Biabduction.Paths.Path.t) list

Execute the function call and return the list of results with return value

\ No newline at end of file +Biabduction__Tabulation (infer.Biabduction__Tabulation)

Module Biabduction__Tabulation

val remove_constant_string_class : IR.Tenv.t -> 'a Biabduction.Prop.t -> Biabduction.Prop.normal Biabduction.Prop.t

Remove constant string or class from a prop

val create_cast_exception : IR.Tenv.t -> IBase.Logging.ocaml_pos -> IR.Procname.t option -> IR.Exp.t -> IR.Exp.t -> IR.Exp.t -> exn

raise a cast exception

val prop_is_exn : IR.Procname.t -> 'a Biabduction.Prop.t -> bool

check if a prop is an exception

val prop_get_exn_name : IR.Procname.t -> 'a Biabduction.Prop.t -> IR.Typ.Name.t option

when prop is an exception, return the exception name

val lookup_custom_errors : 'a Biabduction.Prop.t -> string option

search in prop contains an error state

val exe_function_call : Biabduction.BiabductionSummary.t Absint.InterproceduralAnalysis.t -> callee_attributes:IR.ProcAttributes.t -> callee_pname:IR.Procname.t -> callee_summary:Biabduction.BiabductionSummary.t -> ret_id:IR.Ident.t -> IBase.Location.t -> actuals:(IR.Exp.t * IR.Typ.t) list -> Biabduction.Prop.normal Biabduction.Prop.t -> Biabduction.Paths.Path.t -> (Biabduction.Prop.normal Biabduction.Prop.t * Biabduction.Paths.Path.t) list

Execute the function call and return the list of results with return value

\ No newline at end of file diff --git a/website/static/odoc/next/infer/IBase/Config/index.html b/website/static/odoc/next/infer/IBase/Config/index.html index 31472841a..725491aed 100644 --- a/website/static/odoc/next/infer/IBase/Config/index.html +++ b/website/static/odoc/next/infer/IBase/Config/index.html @@ -1,2 +1,2 @@ -Config (infer.IBase.Config)

Module 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 equal_scheduler : scheduler -> scheduler -> bool
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

Constant configuration values

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_condition_always_true_in_clang : 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

Configuration values specified by command-line options

type iphoneos_target_sdk_version_path_regex = {
path : Str.regexp;
version : 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

Configuration values derived from command-line options

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 java_package_is_external : string -> bool

Check if a Java package is external to the repository

val execution_id : IStdlib.IStd.Int64.t

Global variables with initial values specified by command-line options

val clang_compilation_dbs : [ `Escaped of string | `Raw of string ] list IStdlib.IStd.ref

Command Line Interface Documentation

val print_usage_exit : unit -> 'a
\ No newline at end of file +Config (infer.IBase.Config)

Module 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 equal_scheduler : scheduler -> scheduler -> bool
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

Constant configuration values

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

Configuration values specified by command-line options

type iphoneos_target_sdk_version_path_regex = {
path : Str.regexp;
version : 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

Configuration values derived from command-line options

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 java_package_is_external : string -> bool

Check if a Java package is external to the repository

val execution_id : IStdlib.IStd.Int64.t

Global variables with initial values specified by command-line options

val clang_compilation_dbs : [ `Escaped of string | `Raw of string ] list IStdlib.IStd.ref

Command Line Interface Documentation

val print_usage_exit : unit -> 'a
\ No newline at end of file diff --git a/website/static/odoc/next/infer/IBase/IssueType/index.html b/website/static/odoc/next/infer/IBase/IssueType/index.html index 4ea88dafb..cfdd51279 100644 --- a/website/static/odoc/next/infer/IBase/IssueType/index.html +++ b/website/static/odoc/next/infer/IBase/IssueType/index.html @@ -1,2 +1,2 @@ -IssueType (infer.IBase.IssueType)

Module 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
type severity =
| Like
| Info
| Advice
| Warning
| Error

severity of the report

val compare_severity : severity -> severity -> int
val equal_severity : severity -> severity -> bool
val all_of_severity : severity list
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 compare : t -> t -> int
val equal : t -> t -> bool
val all_issues : unit -> t list

all the issues declared so far

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 biabd_condition_always_false : t
val biabd_condition_always_true : 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 deallocate_stack_variable : t
val deallocate_static_memory : 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 null_test_after_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
\ No newline at end of file +IssueType (infer.IBase.IssueType)

Module 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
type severity =
| Like
| Info
| Advice
| Warning
| Error

severity of the report

val compare_severity : severity -> severity -> int
val equal_severity : severity -> severity -> bool
val all_of_severity : severity list
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 compare : t -> t -> int
val equal : t -> t -> bool
val all_issues : unit -> t list

all the issues declared so far

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
\ No newline at end of file diff --git a/website/static/odoc/next/infer/IBase__Config/index.html b/website/static/odoc/next/infer/IBase__Config/index.html index 4dd4a3286..f130de479 100644 --- a/website/static/odoc/next/infer/IBase__Config/index.html +++ b/website/static/odoc/next/infer/IBase__Config/index.html @@ -1,2 +1,2 @@ -IBase__Config (infer.IBase__Config)

Module 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 equal_scheduler : scheduler -> scheduler -> bool
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

Constant configuration values

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_condition_always_true_in_clang : 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

Configuration values specified by command-line options

type iphoneos_target_sdk_version_path_regex = {
path : Str.regexp;
version : 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

Configuration values derived from command-line options

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 java_package_is_external : string -> bool

Check if a Java package is external to the repository

val execution_id : IStdlib.IStd.Int64.t

Global variables with initial values specified by command-line options

val clang_compilation_dbs : [ `Escaped of string | `Raw of string ] list IStdlib.IStd.ref

Command Line Interface Documentation

val print_usage_exit : unit -> 'a
\ No newline at end of file +IBase__Config (infer.IBase__Config)

Module 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 equal_scheduler : scheduler -> scheduler -> bool
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

Constant configuration values

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

Configuration values specified by command-line options

type iphoneos_target_sdk_version_path_regex = {
path : Str.regexp;
version : 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

Configuration values derived from command-line options

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 java_package_is_external : string -> bool

Check if a Java package is external to the repository

val execution_id : IStdlib.IStd.Int64.t

Global variables with initial values specified by command-line options

val clang_compilation_dbs : [ `Escaped of string | `Raw of string ] list IStdlib.IStd.ref

Command Line Interface Documentation

val print_usage_exit : unit -> 'a
\ No newline at end of file diff --git a/website/static/odoc/next/infer/IBase__IssueType/index.html b/website/static/odoc/next/infer/IBase__IssueType/index.html index b886de48f..2bfa9b787 100644 --- a/website/static/odoc/next/infer/IBase__IssueType/index.html +++ b/website/static/odoc/next/infer/IBase__IssueType/index.html @@ -1,2 +1,2 @@ -IBase__IssueType (infer.IBase__IssueType)

Module 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
type severity =
| Like
| Info
| Advice
| Warning
| Error

severity of the report

val compare_severity : severity -> severity -> int
val equal_severity : severity -> severity -> bool
val all_of_severity : severity list
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 compare : t -> t -> int
val equal : t -> t -> bool
val all_issues : unit -> t list

all the issues declared so far

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 biabd_condition_always_false : t
val biabd_condition_always_true : 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 deallocate_stack_variable : t
val deallocate_static_memory : 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 null_test_after_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
\ No newline at end of file +IBase__IssueType (infer.IBase__IssueType)

Module 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
type severity =
| Like
| Info
| Advice
| Warning
| Error

severity of the report

val compare_severity : severity -> severity -> int
val equal_severity : severity -> severity -> bool
val all_of_severity : severity list
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 compare : t -> t -> int
val equal : t -> t -> bool
val all_issues : unit -> t list

all the issues declared so far

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
\ No newline at end of file diff --git a/website/static/odoc/next/infer/Integration/Help/index.html b/website/static/odoc/next/infer/Integration/Help/index.html index c26b638ed..9fbc4cffd 100644 --- a/website/static/odoc/next/infer/Integration/Help/index.html +++ b/website/static/odoc/next/infer/Integration/Help/index.html @@ -1,2 +1,2 @@ -Help (infer.Integration.Help)

Module Integration.Help

val list_checkers : unit -> unit

print the list of all checkers

val list_issue_types : unit -> unit

print the list of all known issue types

val show_checkers : IBase.Checker.t list -> unit

show information about the given checkers

val show_issue_types : IBase.IssueType.t list -> unit

show information about the given issue_types

val write_website : website_root:string -> unit

generate files for the fbinfer.com website

val url_fragment_of_issue_type : string -> string

given an issue type unique ID, return the URL fragment relative to the website documentation, e.g. url_fragment_of_issue_type "NULL_DEREFERENCE" is "all-issue-types#null_dereference"

\ No newline at end of file +Help (infer.Integration.Help)

Module Integration.Help

val list_checkers : unit -> unit

print the list of all checkers

val list_issue_types : unit -> unit

print the list of all known issue types

val show_checkers : IBase.Checker.t list -> unit

show information about the given checkers

val show_issue_types : IBase.IssueType.t list -> unit

show information about the given issue_types

val write_website : website_root:string -> unit

generate files for the fbinfer.com website

val abs_url_of_issue_type : string -> string

given an issue type unique ID, return the URL relative to the root of the website, e.g. abs_url_of_issue_type "NULL_DEREFERENCE" is "/docs/all-issue-types#null_dereference"

\ No newline at end of file diff --git a/website/static/odoc/next/infer/Integration__Help/index.html b/website/static/odoc/next/infer/Integration__Help/index.html index 868561127..17f18aa9c 100644 --- a/website/static/odoc/next/infer/Integration__Help/index.html +++ b/website/static/odoc/next/infer/Integration__Help/index.html @@ -1,2 +1,2 @@ -Integration__Help (infer.Integration__Help)

Module Integration__Help

val list_checkers : unit -> unit

print the list of all checkers

val list_issue_types : unit -> unit

print the list of all known issue types

val show_checkers : IBase.Checker.t list -> unit

show information about the given checkers

val show_issue_types : IBase.IssueType.t list -> unit

show information about the given issue_types

val write_website : website_root:string -> unit

generate files for the fbinfer.com website

val url_fragment_of_issue_type : string -> string

given an issue type unique ID, return the URL fragment relative to the website documentation, e.g. url_fragment_of_issue_type "NULL_DEREFERENCE" is "all-issue-types#null_dereference"

\ No newline at end of file +Integration__Help (infer.Integration__Help)

Module Integration__Help

val list_checkers : unit -> unit

print the list of all checkers

val list_issue_types : unit -> unit

print the list of all known issue types

val show_checkers : IBase.Checker.t list -> unit

show information about the given checkers

val show_issue_types : IBase.IssueType.t list -> unit

show information about the given issue_types

val write_website : website_root:string -> unit

generate files for the fbinfer.com website

val abs_url_of_issue_type : string -> string

given an issue type unique ID, return the URL relative to the root of the website, e.g. abs_url_of_issue_type "NULL_DEREFERENCE" is "/docs/all-issue-types#null_dereference"

\ No newline at end of file