You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
19 KiB

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>InferModules__ClangTrace (infer.InferModules__ClangTrace)</title><link rel="stylesheet" href="../../odoc.css"/><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><meta name="generator" content="doc-ock-html v1.0.0-1-g1fc9bf0"/></head><body><nav id="top"><a href="../index.html">Up</a> &mdash; <span class="package">package <a href="../index.html">infer</a></span></nav><header><h1><span class="keyword">Module</span> <span class="module-path">InferModules__ClangTrace</span></h1></header><div class="spec include"><div class="doc"></div><details open="open"><summary><span class="def"><code><span class="keyword">include </span><a href="../InferModules/Trace/index.html#module-type-S">InferModules.Trace.S</a></code></span></summary><div class="spec include"><div class="doc"></div><details open="open"><summary><span class="def"><code><span class="keyword">include </span><a href="../InferModules/Trace/index.html#module-type-Spec">InferModules.Trace.Spec</a></code></span></summary><div class="spec module" id="module-Source"><a href="#module-Source" class="anchor"></a><div class="def module"><code><span class="keyword">module </span><a href="Source/index.html">Source</a> : <a href="../InferModules/Source/index.html#module-type-S">InferModules.Source.S</a></code></div><div class="doc"></div></div><div class="spec module" id="module-Sink"><a href="#module-Sink" class="anchor"></a><div class="def module"><code><span class="keyword">module </span><a href="Sink/index.html">Sink</a> : <a href="../InferModules/Sink/index.html#module-type-S">InferModules.Sink.S</a></code></div><div class="doc"></div></div><div class="spec module" id="module-Sanitizer"><a href="#module-Sanitizer" class="anchor"></a><div class="def module"><code><span class="keyword">module </span><a href="Sanitizer/index.html">Sanitizer</a> : <a href="../InferModules/Sanitizer/index.html#module-type-S">InferModules.Sanitizer.S</a></code></div><div class="doc"></div></div><div class="spec val" id="val-get_report"><a href="#val-get_report" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>get_report : <a href="Source/index.html#type-t">Source.t</a> <span class="keyword">&#8209;&gt;</span> <a href="Sink/index.html#type-t">Sink.t</a> <span class="keyword">&#8209;&gt;</span> <a href="Sanitizer/index.html#type-t">Sanitizer.t</a> list <span class="keyword">&#8209;&gt;</span> <a href="../../InferBase/InferBase/IssueType/index.html#type-t">InferBase.IssueType.t</a> option</code></div><div class="doc"><p>return Some(issue) a trace from source to sink passing through the given sanitizers should be
reported, None otherwise</p></div></div></details></div><div class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><div class="def type"><code><span class="keyword">type </span>t</code><code></code><code></code></div><div class="doc"></div></div><div class="spec type" id="type-astate"><a href="#type-astate" class="anchor"></a><div class="def type"><code><span class="keyword">type </span>astate</code><code><span class="keyword"> = </span><a href="index.html#type-t">t</a></code><code></code></div><div class="doc"></div></div><div class="spec include"><div class="doc"></div><details open="open"><summary><span class="def"><code><span class="keyword">include </span><a href="../InferModules/AbstractDomain/index.html#module-type-WithBottom">InferModules.AbstractDomain.WithBottom</a><span class="keyword"> with </span><span class="keyword">type </span><a href="../InferModules/AbstractDomain/module-type-WithBottom/index.html#type-astate">astate</a> := <a href="index.html#type-astate">astate</a></code></span></summary><div class="spec include"><div class="doc"></div><details open="open"><summary><span class="def"><code><span class="keyword">include </span><a href="../InferModules/AbstractDomain/index.html#module-type-S">InferModules.AbstractDomain.S</a></code></span></summary><div class="spec type" id="type-astate"><a href="#type-astate" class="anchor"></a><div class="def type"><code><span class="keyword">type </span>astate</code><code></code><code></code></div><div class="doc"></div></div><div class="spec val" id="val-(&lt;=)"><a href="#val-(&lt;=)" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>(&lt;=) : lhs:<a href="index.html#type-astate">astate</a> <span class="keyword">&#8209;&gt;</span> rhs:<a href="index.html#type-astate">astate</a> <span class="keyword">&#8209;&gt;</span> bool</code></div><div class="doc"><p>the partial order induced by join</p></div></div><div class="spec val" id="val-join"><a href="#val-join" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>join : <a href="index.html#type-astate">astate</a> <span class="keyword">&#8209;&gt;</span> <a href="index.html#type-astate">astate</a> <span class="keyword">&#8209;&gt;</span> <a href="index.html#type-astate">astate</a></code></div><div class="doc"></div></div><div class="spec val" id="val-widen"><a href="#val-widen" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>widen : prev:<a href="index.html#type-astate">astate</a> <span class="keyword">&#8209;&gt;</span> next:<a href="index.html#type-astate">astate</a> <span class="keyword">&#8209;&gt;</span> num_iters:int <span class="keyword">&#8209;&gt;</span> <a href="index.html#type-astate">astate</a></code></div><div class="doc"></div></div><div class="spec val" id="val-pp"><a href="#val-pp" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>pp : <a href="../InferModules/AbstractDomain/index.html#module-F">InferModules.AbstractDomain.F</a>.formatter <span class="keyword">&#8209;&gt;</span> <a href="index.html#type-astate">astate</a> <span class="keyword">&#8209;&gt;</span> unit</code></div><div class="doc"></div></div></details></div><div class="spec val" id="val-empty"><a href="#val-empty" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>empty : <a href="index.html#type-astate">astate</a></code></div><div class="doc"><p>The bottom value of the domain.
Naming it empty instead of bottom helps to bind the empty
value for sets and maps to the natural definition for bottom</p></div></div><div class="spec val" id="val-is_empty"><a href="#val-is_empty" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>is_empty : <a href="index.html#type-astate">astate</a> <span class="keyword">&#8209;&gt;</span> bool</code></div><div class="doc"><p>Return true if this is the bottom value</p></div></div></details></div><div class="spec module" id="module-Sources"><a href="#module-Sources" class="anchor"></a><div class="def module"><code><span class="keyword">module </span><a href="Sources/index.html">Sources</a> : <span class="keyword">sig</span> ... <span class="keyword">end</span></code></div><div class="doc"></div></div><div class="spec module" id="module-Sinks"><a href="#module-Sinks" class="anchor"></a><div class="def module"><code><span class="keyword">module </span>Sinks = <a href="Sink/index.html#module-Set">Sink.Set</a></code></div><div class="doc"></div></div><div class="spec module" id="module-Passthroughs"><a href="#module-Passthroughs" class="anchor"></a><div class="def module"><code><span class="keyword">module </span>Passthroughs = <a href="../InferModules/Passthrough/index.html#module-Set">InferModules.Passthrough.Set</a></code></div><div class="doc"></div></div><div class="spec type" id="type-path"><a href="#type-path" class="anchor"></a><div class="def type"><code><span class="keyword">type </span>path</code><code><span class="keyword"> = </span><a href="index.html#module-Passthroughs">Passthroughs</a>.t<span class="keyword"> * </span>(<a href="Source/index.html#type-t">Source.t</a><span class="keyword"> * </span><a href="index.html#module-Passthroughs">Passthroughs</a>.t) list<span class="keyword"> * </span>(<a href="Sink/index.html#type-t">Sink.t</a><span class="keyword"> * </span><a href="index.html#module-Passthroughs">Passthroughs</a>.t) list</code><code></code></div><div class="doc"><p>path from a source to a sink with passthroughs at each step in the call stack. the first set
of passthroughs are the ones in the &quot;reporting&quot; procedure that calls the first function in
both the source and sink stack</p></div></div><div class="spec type" id="type-report"><a href="#type-report" class="anchor"></a><div class="def type"><code><span class="keyword">type </span>report</code><code></code><code><span class="keyword"> = </span></code><code>{</code><table class="record"><tr id="type-report.issue" class="anchored"><td class="def field"><a href="#type-report.issue" class="anchor"></a><code>issue : <a href="../../InferBase/InferBase/IssueType/index.html#type-t">InferBase.IssueType.t</a>;</code></td></tr><tr id="type-report.path_source" class="anchored"><td class="def field"><a href="#type-report.path_source" class="anchor"></a><code>path_source : <a href="Source/index.html#type-t">Source.t</a>;</code></td></tr><tr id="type-report.path_sink" class="anchored"><td class="def field"><a href="#type-report.path_sink" class="anchor"></a><code>path_sink : <a href="Sink/index.html#type-t">Sink.t</a>;</code></td></tr><tr id="type-report.path_passthroughs" class="anchored"><td class="def field"><a href="#type-report.path_passthroughs" class="anchor"></a><code>path_passthroughs : <a href="index.html#module-Passthroughs">Passthroughs</a>.t;</code></td></tr></table><code>}</code><code></code></div><div class="doc"></div></div><div class="spec val" id="val-empty"><a href="#val-empty" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>empty : <a href="index.html#type-t">t</a></code></div><div class="doc"><p>the empty trace</p></div></div><div class="spec val" id="val-sources"><a href="#val-sources" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>sources : <a href="index.html#type-t">t</a> <span class="keyword">&#8209;&gt;</span> <a href="Sources/index.html#type-t">Sources.t</a></code></div><div class="doc"><p>get the sources of the trace.</p></div></div><div class="spec val" id="val-sinks"><a href="#val-sinks" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>sinks : <a href="index.html#type-t">t</a> <span class="keyword">&#8209;&gt;</span> <a href="index.html#module-Sinks">Sinks</a>.t</code></div><div class="doc"><p>get the sinks of the trace</p></div></div><div class="spec val" id="val-passthroughs"><a href="#val-passthroughs" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>passthroughs : <a href="index.html#type-t">t</a> <span class="keyword">&#8209;&gt;</span> <a href="index.html#module-Passthroughs">Passthroughs</a>.t</code></div><div class="doc"><p>get the passthroughs of the trace</p></div></div><div class="spec val" id="val-get_reports"><a href="#val-get_reports" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>get_reports : ?&#8288;cur_site:<a href="../../InferIR/InferIR/CallSite/index.html#type-t">InferIR.CallSite.t</a> <span class="keyword">&#8209;&gt;</span> <a href="index.html#type-t">t</a> <span class="keyword">&#8209;&gt;</span> <a href="index.html#type-report">report</a> list</code></div><div class="doc"><p>get the reportable source-sink flows in this trace. specifying <code class="code">cur_site</code> restricts the
reported paths to ones introduced by the call at <code class="code">cur_site</code></p></div></div><div class="spec val" id="val-get_reportable_paths"><a href="#val-get_reportable_paths" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>get_reportable_paths : ?&#8288;cur_site:<a href="../../InferIR/InferIR/CallSite/index.html#type-t">InferIR.CallSite.t</a> <span class="keyword">&#8209;&gt;</span> <a href="index.html#type-t">t</a> <span class="keyword">&#8209;&gt;</span> trace_of_pname:(<a href="../../InferIR/InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a> <span class="keyword">&#8209;&gt;</span> <a href="index.html#type-t">t</a>) <span class="keyword">&#8209;&gt;</span> <a href="index.html#type-path">path</a> list</code></div><div class="doc"><p>get a path for each of the reportable source -&gt; sink flows in this trace. specifying
<code class="code">cur_site</code> restricts the reported paths to ones introduced by the call at <code class="code">cur_site</code></p></div></div><div class="spec val" id="val-to_loc_trace"><a href="#val-to_loc_trace" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>to_loc_trace : ?&#8288;desc_of_source:(<a href="Source/index.html#type-t">Source.t</a> <span class="keyword">&#8209;&gt;</span> string) <span class="keyword">&#8209;&gt;</span> ?&#8288;source_should_nest:(<a href="Source/index.html#type-t">Source.t</a> <span class="keyword">&#8209;&gt;</span> bool) <span class="keyword">&#8209;&gt;</span> ?&#8288;desc_of_sink:(<a href="Sink/index.html#type-t">Sink.t</a> <span class="keyword">&#8209;&gt;</span> string) <span class="keyword">&#8209;&gt;</span> ?&#8288;sink_should_nest:(<a href="Sink/index.html#type-t">Sink.t</a> <span class="keyword">&#8209;&gt;</span> bool) <span class="keyword">&#8209;&gt;</span> <a href="index.html#type-path">path</a> <span class="keyword">&#8209;&gt;</span> <a href="../../InferIR/InferIR/Errlog/index.html#type-loc_trace">InferIR.Errlog.loc_trace</a></code></div><div class="doc"><p>create a loc_trace from a path; <code class="code">source_should_nest s</code> should be true when we are going one
deeper into a call-chain, ie when lt_level should be bumper in the next loc_trace_elem, and
similarly for <code class="code">sink_should_nest</code></p></div></div><div class="spec val" id="val-of_source"><a href="#val-of_source" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>of_source : <a href="Source/index.html#type-t">Source.t</a> <span class="keyword">&#8209;&gt;</span> <a href="index.html#type-t">t</a></code></div><div class="doc"><p>create a trace from a source</p></div></div><div class="spec val" id="val-of_footprint"><a href="#val-of_footprint" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>of_footprint : <a href="../../InferIR/InferIR/AccessPath/Abs/index.html#type-t">InferIR.AccessPath.Abs.t</a> <span class="keyword">&#8209;&gt;</span> <a href="index.html#type-t">t</a></code></div><div class="doc"><p>create a trace from a footprint access path</p></div></div><div class="spec val" id="val-add_source"><a href="#val-add_source" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>add_source : <a href="Source/index.html#type-t">Source.t</a> <span class="keyword">&#8209;&gt;</span> <a href="index.html#type-t">t</a> <span class="keyword">&#8209;&gt;</span> <a href="index.html#type-t">t</a></code></div><div class="doc"><p>add a source to the current trace</p></div></div><div class="spec val" id="val-add_sink"><a href="#val-add_sink" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>add_sink : <a href="Sink/index.html#type-t">Sink.t</a> <span class="keyword">&#8209;&gt;</span> <a href="index.html#type-t">t</a> <span class="keyword">&#8209;&gt;</span> <a href="index.html#type-t">t</a></code></div><div class="doc"><p>add a sink to the current trace.</p></div></div><div class="spec val" id="val-add_sanitizer"><a href="#val-add_sanitizer" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>add_sanitizer : <a href="Sanitizer/index.html#type-t">Sanitizer.t</a> <span class="keyword">&#8209;&gt;</span> <a href="index.html#type-t">t</a> <span class="keyword">&#8209;&gt;</span> <a href="index.html#type-t">t</a></code></div><div class="doc"><p>add a sanitizer to the current trace</p></div></div><div class="spec val" id="val-update_sources"><a href="#val-update_sources" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>update_sources : <a href="index.html#type-t">t</a> <span class="keyword">&#8209;&gt;</span> <a href="Sources/index.html#type-t">Sources.t</a> <span class="keyword">&#8209;&gt;</span> <a href="index.html#type-t">t</a></code></div><div class="doc"></div></div><div class="spec val" id="val-update_sinks"><a href="#val-update_sinks" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>update_sinks : <a href="index.html#type-t">t</a> <span class="keyword">&#8209;&gt;</span> <a href="index.html#module-Sinks">Sinks</a>.t <span class="keyword">&#8209;&gt;</span> <a href="index.html#type-t">t</a></code></div><div class="doc"><p>replace sinks with new ones</p></div></div><div class="spec val" id="val-get_footprint_indexes"><a href="#val-get_footprint_indexes" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>get_footprint_indexes : <a href="index.html#type-t">t</a> <span class="keyword">&#8209;&gt;</span> <a href="../../InferStdlib/InferStdlib/index.html#module-IntSet">InferStdlib.IntSet</a>.t</code></div><div class="doc"><p>get the footprint indexes for all of the sources in the trace</p></div></div><div class="spec val" id="val-append"><a href="#val-append" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>append : <a href="index.html#type-t">t</a> <span class="keyword">&#8209;&gt;</span> <a href="index.html#type-t">t</a> <span class="keyword">&#8209;&gt;</span> <a href="../../InferIR/InferIR/CallSite/index.html#type-t">InferIR.CallSite.t</a> <span class="keyword">&#8209;&gt;</span> <a href="index.html#type-t">t</a></code></div><div class="doc"><p>append the trace for given call site to the current caller trace</p></div></div><div class="spec val" id="val-is_empty"><a href="#val-is_empty" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>is_empty : <a href="index.html#type-t">t</a> <span class="keyword">&#8209;&gt;</span> bool</code></div><div class="doc"><p>return true if this trace has no source or sink data</p></div></div><div class="spec val" id="val-pp"><a href="#val-pp" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>pp : <a href="../InferModules/Trace/index.html#module-F">InferModules.Trace.F</a>.formatter <span class="keyword">&#8209;&gt;</span> <a href="index.html#type-t">t</a> <span class="keyword">&#8209;&gt;</span> unit</code></div><div class="doc"></div></div><div class="spec val" id="val-pp_path"><a href="#val-pp_path" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>pp_path : <a href="../../InferIR/InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a> <span class="keyword">&#8209;&gt;</span> <a href="../InferModules/Trace/index.html#module-F">InferModules.Trace.F</a>.formatter <span class="keyword">&#8209;&gt;</span> <a href="index.html#type-path">path</a> <span class="keyword">&#8209;&gt;</span> unit</code></div><div class="doc"><p>pretty-print a path in the context of the given procname</p></div></div></details></div></body></html>