Skip to content

Commit

Permalink
[web] Update infer web page
Browse files Browse the repository at this point in the history
Summary: ^^

Reviewed By: geralt-encore

Differential Revision:
D64539771

Privacy Context Container: L1208441

fbshipit-source-id: e23bf7bb31af343811bb192f8b1f1e60b36702ae
  • Loading branch information
skcho authored and facebook-github-bot committed Oct 17, 2024
1 parent ddd9a6c commit f87c040
Show file tree
Hide file tree
Showing 84 changed files with 264 additions and 216 deletions.
1 change: 1 addition & 0 deletions website/docs/all-categories.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ Issue types in this category:
- [PULSE_DICT_MISSING_KEY](/docs/next/all-issue-types#pulse_dict_missing_key)
- [PULSE_DYNAMIC_TYPE_MISMATCH](/docs/next/all-issue-types#pulse_dynamic_type_mismatch)
- [PULSE_UNINITIALIZED_CONST](/docs/next/all-issue-types#pulse_uninitialized_const)
- [PULSE_UNINITIALIZED_METHOD](/docs/next/all-issue-types#pulse_uninitialized_method)

## Sensitive data flow

Expand Down
30 changes: 30 additions & 0 deletions website/docs/all-issue-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -2047,6 +2047,36 @@ function call_get_field_ok(): string {
}
```

## PULSE_UNINITIALIZED_METHOD

*Category: [Runtime exception](/docs/next/all-categories#runtime-exception). Reported as "Uninitialized Method" by [pulse](/docs/next/checker-pulse).*

This issue is similar to [`PULSE_UNINITIALIZED_CONST`](#pulse_uninitialized_const), but it is to detect the uninitialized method call in Hack.

For example, in the following code, the static method `foo` is declared only in the interface and the abstract class. Thus, calling the static method can introduce an unexpected exception or a fatal error, while the type checker does miss the issue.

```hack
interface MyInterface {
public static function foo(): string;
}

abstract class MyAbstractClass {
public abstract static function foo(): string;
}

function interface_method_static_method_bad(): string {
// Uncaught exception 'TypehintViolationException'
$c = MyInterface::class;
return $c::foo();
}

function abstract_class_static_method_bad(): string {
// Fatal error: Cannot call abstract method
$c = MyAbstractClass::class;
return $c::foo();
}
```

## PULSE_UNINITIALIZED_VALUE

*Category: [Memory error](/docs/next/all-categories#memory-error). Reported as "Uninitialized Value" by [pulse](/docs/next/checker-pulse).*
Expand Down
1 change: 1 addition & 0 deletions website/docs/checker-pulse.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ The following issue types are reported by this checker:
- [PULSE_UNAWAITED_AWAITABLE](/docs/next/all-issue-types#pulse_unawaited_awaitable)
- [PULSE_UNFINISHED_BUILDER](/docs/next/all-issue-types#pulse_unfinished_builder)
- [PULSE_UNINITIALIZED_CONST](/docs/next/all-issue-types#pulse_uninitialized_const)
- [PULSE_UNINITIALIZED_METHOD](/docs/next/all-issue-types#pulse_uninitialized_method)
- [PULSE_UNINITIALIZED_VALUE](/docs/next/all-issue-types#pulse_uninitialized_value)
- [PULSE_UNNECESSARY_COPY](/docs/next/all-issue-types#pulse_unnecessary_copy)
- [PULSE_UNNECESSARY_COPY_ASSIGNMENT](/docs/next/all-issue-types#pulse_unnecessary_copy_assignment)
Expand Down
8 changes: 7 additions & 1 deletion website/static/man/next/infer-analyze.1.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions website/static/man/next/infer-capture.1.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion website/static/man/next/infer-report.1.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 27 additions & 1 deletion website/static/man/next/infer.1.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 17 additions & 17 deletions website/static/odoc/next/infer/ATDGenerated/Clang_ast_b/index.html

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions website/static/odoc/next/infer/ATDGenerated/Clang_ast_j/index.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

36 changes: 17 additions & 19 deletions website/static/odoc/next/infer/ATDGenerated/Clang_ast_v/index.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>TaskSchedulerTypes (infer.Absint.TaskSchedulerTypes)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.2"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../odoc.support/highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a><a href="../../index.html">infer</a> &#x00BB; <a href="../index.html">Absint</a> &#x00BB; TaskSchedulerTypes</nav><header class="odoc-preamble"><h1>Module <code><span>Absint.TaskSchedulerTypes</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-target"><a href="#type-target" class="anchor"></a><code><span><span class="keyword">type</span> target</span><span> = </span></code><ol><li id="type-target.Procname" class="def variant constructor anchored"><a href="#type-target.Procname" class="anchor"></a><code><span>| </span><span><span class="constructor">Procname</span> <span class="keyword">of</span> </span><span>{</span></code><ol><li id="type-target.proc_name" class="def record field anchored"><a href="#type-target.proc_name" class="anchor"></a><code><span>proc_name : <a href="../../IR/Procname/index.html#type-t">IR.Procname.t</a>;</span></code></li><li id="type-target.specialization" class="def record field anchored"><a href="#type-target.specialization" class="anchor"></a><code><span>specialization : <span><a href="../../IR/Specialization/index.html#type-t">IR.Specialization.t</a> option</span>;</span></code></li></ol><code><span>}</span></code></li><li id="type-target.File" class="def variant constructor anchored"><a href="#type-target.File" class="anchor"></a><code><span>| </span><span><span class="constructor">File</span> <span class="keyword">of</span> <a href="../../IBase/SourceFile/index.html#type-t">IBase.SourceFile.t</a></span></code></li></ol></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-analysis_result"><a href="#type-analysis_result" class="anchor"></a><code><span><span class="keyword">type</span> analysis_result</span><span> = </span></code><ol><li id="type-analysis_result.Ok" class="def variant constructor anchored"><a href="#type-analysis_result.Ok" class="anchor"></a><code><span>| </span><span><span class="constructor">Ok</span></span></code><div class="def-doc"><span class="comment-delim">(*</span><p>Analysis finished normally.</p><span class="comment-delim">*)</span></div></li><li id="type-analysis_result.RaceOn" class="def variant constructor anchored"><a href="#type-analysis_result.RaceOn" class="anchor"></a><code><span>| </span><span><span class="constructor">RaceOn</span> <span class="keyword">of</span> </span><span>{</span></code><ol><li id="type-analysis_result.dependency_filename" class="def record field anchored"><a href="#type-analysis_result.dependency_filename" class="anchor"></a><code><span>dependency_filename : string;</span></code></li></ol><code><span>}</span></code><div class="def-doc"><span class="comment-delim">(*</span><p>Analysis stopped when trying to access the summary of a callee and that callee is being analyzed by another worker. <code>dependency_filename</code> is the path to the callee's lock file.</p><span class="comment-delim">*)</span></div></li></ol></div></div></div></body></html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>TaskSchedulerTypes (infer.Absint.TaskSchedulerTypes)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.2"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../odoc.support/highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a><a href="../../index.html">infer</a> &#x00BB; <a href="../index.html">Absint</a> &#x00BB; TaskSchedulerTypes</nav><header class="odoc-preamble"><h1>Module <code><span>Absint.TaskSchedulerTypes</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-target"><a href="#type-target" class="anchor"></a><code><span><span class="keyword">type</span> target</span><span> = </span></code><ol><li id="type-target.Procname" class="def variant constructor anchored"><a href="#type-target.Procname" class="anchor"></a><code><span>| </span><span><span class="constructor">Procname</span> <span class="keyword">of</span> </span><span>{</span></code><ol><li id="type-target.proc_name" class="def record field anchored"><a href="#type-target.proc_name" class="anchor"></a><code><span>proc_name : <a href="../../IR/Procname/index.html#type-t">IR.Procname.t</a>;</span></code></li><li id="type-target.specialization" class="def record field anchored"><a href="#type-target.specialization" class="anchor"></a><code><span>specialization : <span><a href="../../IR/Specialization/index.html#type-t">IR.Specialization.t</a> option</span>;</span></code></li></ol><code><span>}</span></code></li><li id="type-target.File" class="def variant constructor anchored"><a href="#type-target.File" class="anchor"></a><code><span>| </span><span><span class="constructor">File</span> <span class="keyword">of</span> <a href="../../IBase/SourceFile/index.html#type-t">IBase.SourceFile.t</a></span></code></li></ol></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-analysis_result"><a href="#type-analysis_result" class="anchor"></a><code><span><span class="keyword">type</span> analysis_result</span><span> = </span></code><ol><li id="type-analysis_result.Ok" class="def variant constructor anchored"><a href="#type-analysis_result.Ok" class="anchor"></a><code><span>| </span><span><span class="constructor">Ok</span></span></code><div class="def-doc"><span class="comment-delim">(*</span><p>Analysis finished normally.</p><span class="comment-delim">*)</span></div></li><li id="type-analysis_result.RaceOn" class="def variant constructor anchored"><a href="#type-analysis_result.RaceOn" class="anchor"></a><code><span>| </span><span><span class="constructor">RaceOn</span> <span class="keyword">of</span> </span><span>{</span></code><ol><li id="type-analysis_result.dependency_filenames" class="def record field anchored"><a href="#type-analysis_result.dependency_filenames" class="anchor"></a><code><span>dependency_filenames : <span>string list</span>;</span></code></li></ol><code><span>}</span></code><div class="def-doc"><span class="comment-delim">(*</span><p>Analysis stopped when trying to access the summary of a callee and that callee is being analyzed by another worker. <code>dependency_filenames</code> are in the path to the callee's lock file.</p><span class="comment-delim">*)</span></div></li></ol></div></div></div></body></html>
7 changes: 6 additions & 1 deletion website/static/odoc/next/infer/Backend/ProcLocker/index.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>ProcLocker (infer.Backend.ProcLocker)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.2"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../odoc.support/highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a><a href="../../index.html">infer</a> &#x00BB; <a href="../index.html">Backend</a> &#x00BB; ProcLocker</nav><header class="odoc-preamble"><h1>Module <code><span>Backend.ProcLocker</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-setup"><a href="#val-setup" class="anchor"></a><code><span><span class="keyword">val</span> setup : <span>unit <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p>This should be called once before trying to lock Anything.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-try_lock"><a href="#val-try_lock" class="anchor"></a><code><span><span class="keyword">val</span> try_lock : <span><a href="../../IR/Procname/index.html#type-t">IR.Procname.t</a> <span class="arrow">&#45;&gt;</span></span> bool</span></code></div><div class="spec-doc"><p>true = the lock belongs to the calling process. false = the lock belongs to a different worker</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-unlock"><a href="#val-unlock" class="anchor"></a><code><span><span class="keyword">val</span> unlock : <span><a href="../../IR/Procname/index.html#type-t">IR.Procname.t</a> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p>This will work as a cleanup function because after calling unlock all the workers that need an unlocked Proc should find it's summary already Cached. Throws if the lock had not been taken.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-is_locked"><a href="#val-is_locked" class="anchor"></a><code><span><span class="keyword">val</span> is_locked : <span><span class="label">proc_filename</span>:string <span class="arrow">&#45;&gt;</span></span> bool</span></code></div></div></div></body></html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>ProcLocker (infer.Backend.ProcLocker)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.2"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../odoc.support/highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a><a href="../../index.html">infer</a> &#x00BB; <a href="../index.html">Backend</a> &#x00BB; ProcLocker</nav><header class="odoc-preamble"><h1>Module <code><span>Backend.ProcLocker</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-setup"><a href="#val-setup" class="anchor"></a><code><span><span class="keyword">val</span> setup : <span>unit <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p>This should be called once before trying to lock Anything.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-try_lock"><a href="#val-try_lock" class="anchor"></a><code><span><span class="keyword">val</span> try_lock :
<span><a href="../../IR/Procname/index.html#type-t">IR.Procname.t</a> <span class="arrow">&#45;&gt;</span></span>
<span>[ `AlreadyLockedByUs <span>| `LockedByAnotherProcess</span> <span>| `LockAcquired</span> ]</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-unlock"><a href="#val-unlock" class="anchor"></a><code><span><span class="keyword">val</span> unlock : <span><a href="../../IR/Procname/index.html#type-t">IR.Procname.t</a> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p>This will work as a cleanup function because after calling unlock all the workers that need an unlocked Proc should find it's summary already Cached. Throws if the lock had not been taken.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-lock_all"><a href="#val-lock_all" class="anchor"></a><code><span><span class="keyword">val</span> lock_all :
<span><span class="xref-unresolved">IStdlib</span>.IStd.Pid.t <span class="arrow">&#45;&gt;</span></span>
<span><span>string list</span> <span class="arrow">&#45;&gt;</span></span>
<span>[&gt; `FailedToLockAll <span><span>| `LocksAcquired</span> of <span>string list</span></span> ]</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-unlock_all"><a href="#val-unlock_all" class="anchor"></a><code><span><span class="keyword">val</span> unlock_all : <span><span>string list</span> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div></div></div></body></html>
Loading

0 comments on commit f87c040

Please sign in to comment.