Skip to content

Commit

Permalink
add category for SIOF
Browse files Browse the repository at this point in the history
Summary:
Set the category for SIOF issues, namely Memory Error, which is the same as
reads of uninitialised values.

Reviewed By: ngorogiannis

Differential Revision: D59757393

fbshipit-source-id: 64e51a8446f0677882ec575f2eaaa32f44f3ef65
  • Loading branch information
jvillard authored and facebook-github-bot committed Jul 15, 2024
1 parent a4f2c0a commit 94d7a00
Show file tree
Hide file tree
Showing 19 changed files with 52 additions and 11 deletions.
2 changes: 1 addition & 1 deletion infer/src/base/IssueType.ml
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,7 @@ let starvation =


let static_initialization_order_fiasco =
register ~category:NoCategory ~id:"STATIC_INITIALIZATION_ORDER_FIASCO" Error SIOF
register ~category:MemoryError ~id:"STATIC_INITIALIZATION_ORDER_FIASCO" Error SIOF
~user_documentation:[%blob "./documentation/issues/STATIC_INITIALIZATION_ORDER_FIASCO.md"]


Expand Down
1 change: 1 addition & 0 deletions website/docs/all-categories.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Issue types in this category:
- [PULSE_REFERENCE_STABILITY](/docs/next/all-issue-types#pulse_reference_stability)
- [PULSE_UNINITIALIZED_VALUE](/docs/next/all-issue-types#pulse_uninitialized_value)
- [STACK_VARIABLE_ADDRESS_ESCAPE](/docs/next/all-issue-types#stack_variable_address_escape)
- [STATIC_INITIALIZATION_ORDER_FIASCO](/docs/next/all-issue-types#static_initialization_order_fiasco)
- [STRONG_SELF_NOT_CHECKED](/docs/next/all-issue-types#strong_self_not_checked)
- [USE_AFTER_DELETE](/docs/next/all-issue-types#use_after_delete)
- [USE_AFTER_DELETE_LATENT](/docs/next/all-issue-types#use_after_delete_latent)
Expand Down
2 changes: 1 addition & 1 deletion website/docs/all-issue-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -2756,7 +2756,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](/docs/next/checker-siof).*
*Category: [Memory error](/docs/next/all-categories#memory-error). 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
Expand Down
2 changes: 2 additions & 0 deletions website/static/odoc/next/infer/BO/BiabductionProp/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>BiabductionProp (infer.BO.BiabductionProp)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.1"/><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">BO</a> &#x00BB; BiabductionProp</nav><header class="odoc-preamble"><h1>Module <code><span>BO.BiabductionProp</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-exp_normalize_noabs"><a href="#val-exp_normalize_noabs" class="anchor"></a><code><span><span class="keyword">val</span> exp_normalize_noabs : <span><a href="../../IR/Tenv/index.html#type-t">IR.Tenv.t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../../IR/Exp/index.html#type-t">IR.Exp.t</a> <span class="arrow">&#45;&gt;</span></span> <a href="../../IR/Exp/index.html#type-t">IR.Exp.t</a></span></code></div><div class="spec-doc"><p>Normalize the expression without abstracting complex subexpressions</p></div></div></div></body></html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Dot (infer.Checkers.Lineage.Unified.Dot)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.1"/><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">Checkers</a> &#x00BB; <a href="../../index.html">Lineage</a> &#x00BB; <a href="../index.html">Unified</a> &#x00BB; Dot</nav><header class="odoc-preamble"><h1>Module <code><span>Unified.Dot</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-output_graph"><a href="#val-output_graph" class="anchor"></a><code><span><span class="keyword">val</span> output_graph : <span><span class="xref-unresolved">Stdlib</span>.out_channel <span class="arrow">&#45;&gt;</span></span> <span><span class="xref-unresolved">G</span>.t <span class="arrow">&#45;&gt;</span></span> unit</span></code></div></div></div></body></html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>UVertex (infer.Checkers.Lineage.Unified.UVertex)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.1"/><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">Checkers</a> &#x00BB; <a href="../../index.html">Lineage</a> &#x00BB; <a href="../index.html">Unified</a> &#x00BB; UVertex</nav><header class="odoc-preamble"><h1>Module <code><span>Unified.UVertex</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-v"><a href="#type-v" class="anchor"></a><code><span><span class="keyword">type</span> v</span><span> = </span></code><ol><li id="type-v.Local" class="def variant constructor anchored"><a href="#type-v.Local" class="anchor"></a><code><span>| </span><span><span class="constructor">Local</span> <span class="keyword">of</span> <a href="../../Local/index.html#type-t">Local.t</a> * <a href="../../PPNode/index.html#type-t">PPNode.t</a></span></code></li><li id="type-v.Argument" class="def variant constructor anchored"><a href="#type-v.Argument" class="anchor"></a><code><span>| </span><span><span class="constructor">Argument</span> <span class="keyword">of</span> int * <a href="../../../LineageShape/FieldPath/index.html#type-t">Checkers.LineageShape.StdModules.FieldPath.t</a></span></code></li><li id="type-v.Return" class="def variant constructor anchored"><a href="#type-v.Return" class="anchor"></a><code><span>| </span><span><span class="constructor">Return</span> <span class="keyword">of</span> <a href="../../../LineageShape/FieldPath/index.html#type-t">Checkers.LineageShape.StdModules.FieldPath.t</a></span></code></li><li id="type-v.Captured" class="def variant constructor anchored"><a href="#type-v.Captured" class="anchor"></a><code><span>| </span><span><span class="constructor">Captured</span> <span class="keyword">of</span> int</span></code></li><li id="type-v.Function" class="def variant constructor anchored"><a href="#type-v.Function" class="anchor"></a><code><span>| </span><span><span class="constructor">Function</span></span></code></li></ol></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-sexp_of_v"><a href="#val-sexp_of_v" class="anchor"></a><code><span><span class="keyword">val</span> sexp_of_v : <span><a href="#type-v">v</a> <span class="arrow">&#45;&gt;</span></span> <span class="xref-unresolved">Sexplib0</span>.Sexp.t</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-v_of_sexp"><a href="#val-v_of_sexp" class="anchor"></a><code><span><span class="keyword">val</span> v_of_sexp : <span><span class="xref-unresolved">Sexplib0</span>.Sexp.t <span class="arrow">&#45;&gt;</span></span> <a href="#type-v">v</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-compare_v"><a href="#val-compare_v" class="anchor"></a><code><span><span class="keyword">val</span> compare_v : <span><a href="#type-v">v</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-v">v</a> <span class="arrow">&#45;&gt;</span></span> int</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-equal_v"><a href="#val-equal_v" class="anchor"></a><code><span><span class="keyword">val</span> equal_v : <span><a href="#type-v">v</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-v">v</a> <span class="arrow">&#45;&gt;</span></span> bool</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-hash_fold_v"><a href="#val-hash_fold_v" class="anchor"></a><code><span><span class="keyword">val</span> hash_fold_v :
<span><span class="xref-unresolved">Ppx_hash_lib</span>.Std.Hash.state <span class="arrow">&#45;&gt;</span></span>
<span><a href="#type-v">v</a> <span class="arrow">&#45;&gt;</span></span>
<span class="xref-unresolved">Ppx_hash_lib</span>.Std.Hash.state</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-hash_v"><a href="#val-hash_v" class="anchor"></a><code><span><span class="keyword">val</span> hash_v : <span><a href="#type-v">v</a> <span class="arrow">&#45;&gt;</span></span> <span class="xref-unresolved">Ppx_hash_lib</span>.Std.Hash.hash_value</span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span><span> = </span><span>{</span></code><ol><li id="type-t.procname" class="def record field anchored"><a href="#type-t.procname" class="anchor"></a><code><span>procname : <a href="../../../../IR/Procname/index.html#type-t">IR.Procname.t</a>;</span></code></li><li id="type-t.vertex" class="def record field anchored"><a href="#type-t.vertex" class="anchor"></a><code><span>vertex : <a href="#type-v">v</a>;</span></code></li></ol><code><span>}</span></code></div></div><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <span class="xref-unresolved">Sexplib0</span>.Sexpable.S <span class="keyword">with</span> <span><span class="keyword">type</span> <span class="xref-unresolved">t</span> := <span class="xref-unresolved">t</span></span></span></code></summary><div class="odoc-spec"><div class="spec value anchored" id="val-t_of_sexp"><a href="#val-t_of_sexp" class="anchor"></a><code><span><span class="keyword">val</span> t_of_sexp : <span><span class="xref-unresolved">Sexplib0__</span>.Sexp.t <span class="arrow">&#45;&gt;</span></span> <a href="#type-t">t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-sexp_of_t"><a href="#val-sexp_of_t" class="anchor"></a><code><span><span class="keyword">val</span> sexp_of_t : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span class="xref-unresolved">Sexplib0__</span>.Sexp.t</span></code></div></div></details></div><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <span class="xref-unresolved">Ppx_compare_lib</span>.Comparable.S <span class="keyword">with</span> <span><span class="keyword">type</span> <span class="xref-unresolved">t</span> := <span class="xref-unresolved">t</span></span></span></code></summary><div class="odoc-spec"><div class="spec value anchored" id="val-compare"><a href="#val-compare" class="anchor"></a><code><span><span class="keyword">val</span> compare : <span><a href="#type-t">t</a> <span class="xref-unresolved">Base__Ppx_compare_lib</span>.compare</span></span></code></div></div></details></div><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <span class="xref-unresolved">Ppx_compare_lib</span>.Equal.S <span class="keyword">with</span> <span><span class="keyword">type</span> <span class="xref-unresolved">t</span> := <span class="xref-unresolved">t</span></span></span></code></summary><div class="odoc-spec"><div class="spec value anchored" id="val-equal"><a href="#val-equal" class="anchor"></a><code><span><span class="keyword">val</span> equal : <span><a href="#type-t">t</a> <span class="xref-unresolved">Base__Ppx_compare_lib</span>.equal</span></span></code></div></div></details></div><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <span class="xref-unresolved">Ppx_hash_lib</span>.Hashable.S <span class="keyword">with</span> <span><span class="keyword">type</span> <span class="xref-unresolved">t</span> := <span class="xref-unresolved">t</span></span></span></code></summary><div class="odoc-spec"><div class="spec value anchored" id="val-hash_fold_t"><a href="#val-hash_fold_t" class="anchor"></a><code><span><span class="keyword">val</span> hash_fold_t : <span><a href="#type-t">t</a> <span class="xref-unresolved">Base__Ppx_hash_lib</span>.hash_fold</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-hash"><a href="#val-hash" class="anchor"></a><code><span><span class="keyword">val</span> hash : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span class="xref-unresolved">Base__Ppx_hash_lib</span>.Std.Hash.hash_value</span></code></div></div></details></div></div></body></html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Unified (infer.Checkers.Lineage.Unified)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.1"/><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">Checkers</a> &#x00BB; <a href="../index.html">Lineage</a> &#x00BB; Unified</nav><header class="odoc-preamble"><h1>Module <code><span>Lineage.Unified</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec module anchored" id="module-UVertex"><a href="#module-UVertex" class="anchor"></a><code><span><span class="keyword">module</span> <a href="UVertex/index.html">UVertex</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div><div class="odoc-spec"><div class="spec module-substitution anchored" id="module-LocalG"><a href="#module-LocalG" class="anchor"></a><code><span><span class="keyword">module</span> LocalG := <a href="../G/index.html">G</a></span></code></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-G"><a href="#module-G" class="anchor"></a><code><span><span class="keyword">module</span> G</span><span> : <span class="xref-unresolved">Graph</span>.Sig.P <span class="keyword">with</span> <span><span class="keyword">type</span> <span class="xref-unresolved">V.t</span> = <span class="xref-unresolved">UVertex</span>.t</span> <span class="keyword">and</span> <span><span class="keyword">type</span> <span class="xref-unresolved">E.label</span> = <span class="xref-unresolved">Edge</span>.t</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-transform_e"><a href="#val-transform_e" class="anchor"></a><code><span><span class="keyword">val</span> transform_e :
<span><span>(<span><a href="../../../IR/Procname/index.html#type-t">IR.Procname.t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../../LineageShape/Summary/index.html#type-t">LineageShape.Summary.t</a> option</span>)</span> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../IR/Procname/index.html#type-t">IR.Procname.t</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../G/index.html#type-edge">LocalG.edge</a> <span class="arrow">&#45;&gt;</span></span>
<span><span class="xref-unresolved">G</span>.edge list</span></span></code></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Dot"><a href="#module-Dot" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Dot/index.html">Dot</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div></div></body></html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>EarlyScubaLogging (infer.IBase.EarlyScubaLogging)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.1"/><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">IBase</a> &#x00BB; EarlyScubaLogging</nav><header class="odoc-preamble"><h1>Module <code><span>IBase.EarlyScubaLogging</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-log_message"><a href="#val-log_message" class="anchor"></a><code><span><span class="keyword">val</span> log_message : <span><span class="label">label</span>:string <span class="arrow">&#45;&gt;</span></span> <span><span class="label">message</span>:string <span class="arrow">&#45;&gt;</span></span> unit</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-finish"><a href="#val-finish" class="anchor"></a><code><span><span class="keyword">val</span> finish : <span>unit <span class="arrow">&#45;&gt;</span></span> <span><a href="../LogEntry/index.html#type-t">LogEntry.t</a> list</span></span></code></div></div></div></body></html>
Original file line number Diff line number Diff line change
Expand Up @@ -183,4 +183,7 @@
option</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-has_unknown_effect"><a href="#val-has_unknown_effect" class="anchor"></a><code><span><span class="keyword">val</span> has_unknown_effect :
<span><a href="../../PulseAbstractValue/index.html#type-t">Pulselib.PulseBasicInterface.AbstractValue.t</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../index.html#type-t">t</a> <span class="arrow">&#45;&gt;</span></span>
bool</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-is_hack_sinit_called"><a href="#val-is_hack_sinit_called" class="anchor"></a><code><span><span class="keyword">val</span> is_hack_sinit_called :
<span><a href="../../PulseAbstractValue/index.html#type-t">Pulselib.PulseBasicInterface.AbstractValue.t</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../index.html#type-t">t</a> <span class="arrow">&#45;&gt;</span></span>
bool</span></code></div></div></div></body></html>
Loading

0 comments on commit 94d7a00

Please sign in to comment.