svf-tools 1.0.356 → 1.0.357
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/SVF-doxygen/html/html/ICFGBuilder_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/ICFGBuilder_8h_source.html +1 -1
- package/SVF-doxygen/html/html/VFG_8h_source.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ICFGBuilder.html +5 -4
- package/SVF-doxygen/html/html/classSVF_1_1VFG.html +2 -2
- package/include/Graphs/VFG.h +2 -2
- package/lib/SVF-FE/ICFGBuilder.cpp +9 -5
- package/package.json +1 -1
|
@@ -247,10 +247,11 @@ Private Attributes</h2></td></tr>
|
|
|
247
247
|
<p>Create edges between <a class="el" href="classSVF_1_1ICFG.html">ICFG</a> nodes across functions </p>
|
|
248
248
|
<p>direct call</p>
|
|
249
249
|
<p>if this is an external function (no function body)</p>
|
|
250
|
+
<p>otherwise connect interprocedural edges</p>
|
|
250
251
|
<p>indirect call (don't know callee) </p>
|
|
251
252
|
|
|
252
253
|
<p class="definition">Definition at line <a class="el" href="ICFGBuilder_8cpp_source.html#l00172">172</a> of file <a class="el" href="ICFGBuilder_8cpp_source.html">ICFGBuilder.cpp</a>.</p>
|
|
253
|
-
<div class="fragment"><div class="line"><a name="l00173"></a><span class="lineno"> 173</span> {</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  <a class="code" href="classSVF_1_1CallICFGNode.html">CallICFGNode</a>* <a class="code" href="classSVF_1_1CallICFGNode.html">CallICFGNode</a> = <a class="code" href="classSVF_1_1ICFGBuilder.html#af0b1627b91de8d007d95ee90c6bfb8da">getOrAddCallICFGNode</a>(cs);</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  <a class="code" href="classSVF_1_1RetICFGNode.html">RetICFGNode</a>* retBlockNode = <a class="code" href="classSVF_1_1ICFGBuilder.html#afbf56b40d45f14b3a846d840f44d1681">getOrAddRetICFGNode</a>(cs);</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span> </div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  <span class="keywordflow">if</span>(callee){</div><div class="line"><a name="
|
|
254
|
+
<div class="fragment"><div class="line"><a name="l00173"></a><span class="lineno"> 173</span> {</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  <a class="code" href="classSVF_1_1CallICFGNode.html">CallICFGNode</a>* <a class="code" href="classSVF_1_1CallICFGNode.html">CallICFGNode</a> = <a class="code" href="classSVF_1_1ICFGBuilder.html#af0b1627b91de8d007d95ee90c6bfb8da">getOrAddCallICFGNode</a>(cs);</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  <a class="code" href="classSVF_1_1RetICFGNode.html">RetICFGNode</a>* retBlockNode = <a class="code" href="classSVF_1_1ICFGBuilder.html#afbf56b40d45f14b3a846d840f44d1681">getOrAddRetICFGNode</a>(cs);</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span> </div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  <span class="keywordflow">if</span>(callee){</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  <span class="keywordflow">if</span> (<a class="code" href="namespaceSVF_1_1SVFUtil.html#a22ef185e767ff76c098e75126c885400">isExtCall</a>(callee))</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  {</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  <a class="code" href="classSVF_1_1ICFGBuilder.html#adefeaad9c02000f263430dfee7149ea6">icfg</a>-><a class="code" href="classSVF_1_1ICFG.html#adafd8bbb91507a9a78a3f16305812afc">addIntraEdge</a>(CallICFGNode, retBlockNode); </div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  }</div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  {</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  <a class="code" href="classSVF_1_1FunEntryICFGNode.html">FunEntryICFGNode</a>* calleeEntryNode = <a class="code" href="classSVF_1_1ICFGBuilder.html#adefeaad9c02000f263430dfee7149ea6">icfg</a>-><a class="code" href="classSVF_1_1ICFG.html#a2b32cfb0b4b3e420aa8e67fc6d4f1025">getFunEntryBlockNode</a>(callee);</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  <a class="code" href="classSVF_1_1FunExitICFGNode.html">FunExitICFGNode</a>* calleeExitNode = <a class="code" href="classSVF_1_1ICFGBuilder.html#adefeaad9c02000f263430dfee7149ea6">icfg</a>-><a class="code" href="classSVF_1_1ICFG.html#a8f131fd585f6fa0c93023ee193500b26">getFunExitBlockNode</a>(callee);</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  <a class="code" href="classSVF_1_1ICFGBuilder.html#adefeaad9c02000f263430dfee7149ea6">icfg</a>-><a class="code" href="classSVF_1_1ICFG.html#abde033687317d47909ee45db7501723f">addCallEdge</a>(CallICFGNode, calleeEntryNode, cs);</div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  <a class="code" href="classSVF_1_1ICFGBuilder.html#adefeaad9c02000f263430dfee7149ea6">icfg</a>-><a class="code" href="classSVF_1_1ICFG.html#a4a44849b596c89ab14d2e5f18366e848">addRetEdge</a>(calleeExitNode, retBlockNode, cs);</div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  }</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  }</div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  <span class="keywordflow">else</span>{</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  <a class="code" href="classSVF_1_1ICFGBuilder.html#adefeaad9c02000f263430dfee7149ea6">icfg</a>-><a class="code" href="classSVF_1_1ICFG.html#adafd8bbb91507a9a78a3f16305812afc">addIntraEdge</a>(CallICFGNode, retBlockNode); </div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  }</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span> }</div><div class="ttc" id="classSVF_1_1ICFG_html_abde033687317d47909ee45db7501723f"><div class="ttname"><a href="classSVF_1_1ICFG.html#abde033687317d47909ee45db7501723f">SVF::ICFG::addCallEdge</a></div><div class="ttdeci">ICFGEdge * addCallEdge(ICFGNode *srcNode, ICFGNode *dstNode, const Instruction *cs)</div><div class="ttdef"><b>Definition:</b> <a href="ICFG_8cpp_source.html#l00375">ICFG.cpp:375</a></div></div>
|
|
254
255
|
<div class="ttc" id="classSVF_1_1ICFGBuilder_html_af0b1627b91de8d007d95ee90c6bfb8da"><div class="ttname"><a href="classSVF_1_1ICFGBuilder.html#af0b1627b91de8d007d95ee90c6bfb8da">SVF::ICFGBuilder::getOrAddCallICFGNode</a></div><div class="ttdeci">CallICFGNode * getOrAddCallICFGNode(const Instruction *cs)</div><div class="ttdoc">Add a call node. </div><div class="ttdef"><b>Definition:</b> <a href="ICFGBuilder_8h_source.html#l00087">ICFGBuilder.h:87</a></div></div>
|
|
255
256
|
<div class="ttc" id="classSVF_1_1RetICFGNode_html"><div class="ttname"><a href="classSVF_1_1RetICFGNode.html">SVF::RetICFGNode</a></div><div class="ttdef"><b>Definition:</b> <a href="ICFGNode_8h_source.html#l00459">ICFGNode.h:459</a></div></div>
|
|
256
257
|
<div class="ttc" id="classSVF_1_1FunEntryICFGNode_html"><div class="ttname"><a href="classSVF_1_1FunEntryICFGNode.html">SVF::FunEntryICFGNode</a></div><div class="ttdef"><b>Definition:</b> <a href="ICFGNode_8h_source.html#l00251">ICFGNode.h:251</a></div></div>
|
|
@@ -289,7 +290,7 @@ Private Attributes</h2></td></tr>
|
|
|
289
290
|
<div class="ttc" id="classSVF_1_1ICFGBuilder_html_a2dc4467008cdd6eb896e98b67457082a"><div class="ttname"><a href="classSVF_1_1ICFGBuilder.html#a2dc4467008cdd6eb896e98b67457082a">SVF::ICFGBuilder::WorkList</a></div><div class="ttdeci">FIFOWorkList< const Instruction * > WorkList</div><div class="ttdef"><b>Definition:</b> <a href="ICFGBuilder_8h_source.html#l00051">ICFGBuilder.h:51</a></div></div>
|
|
290
291
|
<div class="ttc" id="classSVF_1_1ICFGBuilder_html_ab1cc5de5c2ee7acf83e9ae51c7b38cb5"><div class="ttname"><a href="classSVF_1_1ICFGBuilder.html#ab1cc5de5c2ee7acf83e9ae51c7b38cb5">SVF::ICFGBuilder::processFunBody</a></div><div class="ttdeci">void processFunBody(WorkList &worklist)</div><div class="ttdef"><b>Definition:</b> <a href="ICFGBuilder_8cpp_source.html#l00080">ICFGBuilder.cpp:80</a></div></div>
|
|
291
292
|
<div class="ttc" id="classSVF_1_1ICFGBuilder_html_a21ecc610b7ac35f4e64b2a4a45688359"><div class="ttname"><a href="classSVF_1_1ICFGBuilder.html#a21ecc610b7ac35f4e64b2a4a45688359">SVF::ICFGBuilder::processFunExit</a></div><div class="ttdeci">void processFunExit(const SVFFunction *fun)</div><div class="ttdef"><b>Definition:</b> <a href="ICFGBuilder_8cpp_source.html#l00139">ICFGBuilder.cpp:139</a></div></div>
|
|
292
|
-
<div class="ttc" id="classSVF_1_1ICFGBuilder_html_a05539eb12b22886ea4b5b4275f601641"><div class="ttname"><a href="classSVF_1_1ICFGBuilder.html#a05539eb12b22886ea4b5b4275f601641">SVF::ICFGBuilder::connectGlobalToProgEntry</a></div><div class="ttdeci">void connectGlobalToProgEntry(SVFModule *svfModule)</div><div class="ttdef"><b>Definition:</b> <a href="ICFGBuilder_8cpp_source.html#
|
|
293
|
+
<div class="ttc" id="classSVF_1_1ICFGBuilder_html_a05539eb12b22886ea4b5b4275f601641"><div class="ttname"><a href="classSVF_1_1ICFGBuilder.html#a05539eb12b22886ea4b5b4275f601641">SVF::ICFGBuilder::connectGlobalToProgEntry</a></div><div class="ttdeci">void connectGlobalToProgEntry(SVFModule *svfModule)</div><div class="ttdef"><b>Definition:</b> <a href="ICFGBuilder_8cpp_source.html#l00201">ICFGBuilder.cpp:201</a></div></div>
|
|
293
294
|
<div class="ttc" id="classSVF_1_1SVFModule_html_a58d03edb6ff85f4943135478f113df31"><div class="ttname"><a href="classSVF_1_1SVFModule.html#a58d03edb6ff85f4943135478f113df31">SVF::SVFModule::end</a></div><div class="ttdeci">iterator end()</div><div class="ttdef"><b>Definition:</b> <a href="SVFModule_8h_source.html#l00155">SVFModule.h:155</a></div></div>
|
|
294
295
|
<div class="ttc" id="classSVF_1_1ICFGBuilder_html_a52e6426f0a1af479159f6fbac6d5b8f4"><div class="ttname"><a href="classSVF_1_1ICFGBuilder.html#a52e6426f0a1af479159f6fbac6d5b8f4">SVF::ICFGBuilder::processFunEntry</a></div><div class="ttdeci">void processFunEntry(const SVFFunction *fun, WorkList &worklist)</div><div class="ttdef"><b>Definition:</b> <a href="ICFGBuilder_8cpp_source.html#l00059">ICFGBuilder.cpp:59</a></div></div>
|
|
295
296
|
<div class="ttc" id="classSVF_1_1SVFModule_html_afcf2978f32e15127fb093405dc17d7f1"><div class="ttname"><a href="classSVF_1_1SVFModule.html#afcf2978f32e15127fb093405dc17d7f1">SVF::SVFModule::const_iterator</a></div><div class="ttdeci">FunctionSetType::const_iterator const_iterator</div><div class="ttdef"><b>Definition:</b> <a href="SVFModule_8h_source.html#l00052">SVFModule.h:52</a></div></div>
|
|
@@ -322,8 +323,8 @@ Private Attributes</h2></td></tr>
|
|
|
322
323
|
</div><div class="memdoc">
|
|
323
324
|
<p>Return back if the main function is not found, the bc file might be a library only </p>
|
|
324
325
|
|
|
325
|
-
<p class="definition">Definition at line <a class="el" href="ICFGBuilder_8cpp_source.html#
|
|
326
|
-
<div class="fragment"><div class="line"><a name="
|
|
326
|
+
<p class="definition">Definition at line <a class="el" href="ICFGBuilder_8cpp_source.html#l00201">201</a> of file <a class="el" href="ICFGBuilder_8cpp_source.html">ICFGBuilder.cpp</a>.</p>
|
|
327
|
+
<div class="fragment"><div class="line"><a name="l00202"></a><span class="lineno"> 202</span> {</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  <span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFFunction.html">SVFFunction</a>* mainFunc = <a class="code" href="namespaceSVF_1_1SVFUtil.html#aa8017e3e5100b3f63ee338b66118d266">SVFUtil::getProgEntryFunction</a>(svfModule);</div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span> </div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  <span class="keywordflow">if</span>(mainFunc == <span class="keyword">nullptr</span>)</div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  <span class="keywordflow">return</span>;</div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span> </div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  <a class="code" href="classSVF_1_1FunEntryICFGNode.html">FunEntryICFGNode</a>* entryNode = <a class="code" href="classSVF_1_1ICFGBuilder.html#adefeaad9c02000f263430dfee7149ea6">icfg</a>-><a class="code" href="classSVF_1_1ICFG.html#a2b32cfb0b4b3e420aa8e67fc6d4f1025">getFunEntryBlockNode</a>(mainFunc);</div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  <a class="code" href="classSVF_1_1GlobalICFGNode.html">GlobalICFGNode</a>* globalNode = <a class="code" href="classSVF_1_1ICFGBuilder.html#adefeaad9c02000f263430dfee7149ea6">icfg</a>-><a class="code" href="classSVF_1_1ICFG.html#a51917fa4244cdb46f06ab647b5c2656f">getGlobalBlockNode</a>();</div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span> </div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  std::vector<ICFGEdge*> toBeRemovedEdges;</div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  <span class="keywordflow">for</span>(<a class="code" href="classSVF_1_1ICFGEdge.html">ICFGEdge</a>* edge : entryNode-><a class="code" href="classSVF_1_1GenericNode.html#a2d9cd758d6f8c5189d9b90b74f43e009">getOutEdges</a>())</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  toBeRemovedEdges.push_back(edge);</div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  </div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  <span class="keywordflow">for</span>(<a class="code" href="classSVF_1_1ICFGEdge.html">ICFGEdge</a>* edge : toBeRemovedEdges){</div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a>(SVFUtil::isa<IntraCFGEdge>(edge) && <span class="stringliteral">"the outgoing edge of FunEntryICFGNode is not an intraCFGEdge?"</span>);</div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  <a class="code" href="classSVF_1_1ICFGBuilder.html#adefeaad9c02000f263430dfee7149ea6">icfg</a>-><a class="code" href="classSVF_1_1ICFG.html#a534625b10673efe5b0f344bfebf9b3cf">removeICFGEdge</a>(edge);</div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  <a class="code" href="classSVF_1_1IntraCFGEdge.html">IntraCFGEdge</a>* intraEdge = <span class="keyword">new</span> <a class="code" href="classSVF_1_1IntraCFGEdge.html">IntraCFGEdge</a>(globalNode, edge->getDstNode());</div><div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  <a class="code" href="classSVF_1_1ICFGBuilder.html#adefeaad9c02000f263430dfee7149ea6">icfg</a>-><a class="code" href="classSVF_1_1ICFG.html#a462f590c2604184d69e4efe3d85a7b5b">addICFGEdge</a>(intraEdge); </div><div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  }</div><div class="line"><a name="l00222"></a><span class="lineno"> 222</span> </div><div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  <a class="code" href="classSVF_1_1IntraCFGEdge.html">IntraCFGEdge</a>* intraEdge = <span class="keyword">new</span> <a class="code" href="classSVF_1_1IntraCFGEdge.html">IntraCFGEdge</a>(entryNode, globalNode);</div><div class="line"><a name="l00224"></a><span class="lineno"> 224</span>  <a class="code" href="classSVF_1_1ICFGBuilder.html#adefeaad9c02000f263430dfee7149ea6">icfg</a>-><a class="code" href="classSVF_1_1ICFG.html#a462f590c2604184d69e4efe3d85a7b5b">addICFGEdge</a>(intraEdge);</div><div class="line"><a name="l00225"></a><span class="lineno"> 225</span> }</div><div class="ttc" id="classSVF_1_1ICFGEdge_html"><div class="ttname"><a href="classSVF_1_1ICFGEdge.html">SVF::ICFGEdge</a></div><div class="ttdef"><b>Definition:</b> <a href="ICFGEdge_8h_source.html#l00042">ICFGEdge.h:42</a></div></div>
|
|
327
328
|
<div class="ttc" id="util_8h_html_a07d17d6d5d1074c0969bc5d3c3d1d84a"><div class="ttname"><a href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a></div><div class="ttdeci">#define assert(ex)</div><div class="ttdef"><b>Definition:</b> <a href="util_8h_source.html#l00141">util.h:141</a></div></div>
|
|
328
329
|
<div class="ttc" id="classSVF_1_1SVFFunction_html"><div class="ttname"><a href="classSVF_1_1SVFFunction.html">SVF::SVFFunction</a></div><div class="ttdef"><b>Definition:</b> <a href="BasicTypes_8h_source.html#l00233">BasicTypes.h:233</a></div></div>
|
|
329
330
|
<div class="ttc" id="namespaceSVF_1_1SVFUtil_html_aa8017e3e5100b3f63ee338b66118d266"><div class="ttname"><a href="namespaceSVF_1_1SVFUtil.html#aa8017e3e5100b3f63ee338b66118d266">SVF::SVFUtil::getProgEntryFunction</a></div><div class="ttdeci">const SVFFunction * getProgEntryFunction(SVFModule *svfModule)</div><div class="ttdoc">Get program entry function from module. </div><div class="ttdef"><b>Definition:</b> <a href="LLVMUtil_8h_source.html#l00440">LLVMUtil.h:440</a></div></div>
|
|
@@ -2797,7 +2797,7 @@ Additional Inherited Members</h2></td></tr>
|
|
|
2797
2797
|
</div><div class="memdoc">
|
|
2798
2798
|
|
|
2799
2799
|
<p class="definition">Definition at line <a class="el" href="VFG_8h_source.html#l00414">414</a> of file <a class="el" href="VFG_8h_source.html">VFG.h</a>.</p>
|
|
2800
|
-
<div class="fragment"><div class="line"><a name="l00415"></a><span class="lineno"> 415</span>  {</div><div class="line"><a name="l00416"></a><span class="lineno"> 416</span>  PAGNodeToDefMapTy::const_iterator it = <a class="code" href="classSVF_1_1VFG.html#ac89b3917ed73ac70aac6205af8f7a4fe">PAGNodeToDefMap</a>.find(pagNode);</div><div class="line"><a name="l00417"></a><span class="lineno"> 417</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a>(it!=<a class="code" href="classSVF_1_1VFG.html#ac89b3917ed73ac70aac6205af8f7a4fe">PAGNodeToDefMap</a>.end() && <span class="stringliteral">"
|
|
2800
|
+
<div class="fragment"><div class="line"><a name="l00415"></a><span class="lineno"> 415</span>  {</div><div class="line"><a name="l00416"></a><span class="lineno"> 416</span>  PAGNodeToDefMapTy::const_iterator it = <a class="code" href="classSVF_1_1VFG.html#ac89b3917ed73ac70aac6205af8f7a4fe">PAGNodeToDefMap</a>.find(pagNode);</div><div class="line"><a name="l00417"></a><span class="lineno"> 417</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a>(it!=<a class="code" href="classSVF_1_1VFG.html#ac89b3917ed73ac70aac6205af8f7a4fe">PAGNodeToDefMap</a>.end() && <span class="stringliteral">"SVFVar does not have a definition??"</span>);</div><div class="line"><a name="l00418"></a><span class="lineno"> 418</span>  <span class="keywordflow">return</span> it->second;</div><div class="line"><a name="l00419"></a><span class="lineno"> 419</span>  }</div><div class="ttc" id="util_8h_html_a07d17d6d5d1074c0969bc5d3c3d1d84a"><div class="ttname"><a href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a></div><div class="ttdeci">#define assert(ex)</div><div class="ttdef"><b>Definition:</b> <a href="util_8h_source.html#l00141">util.h:141</a></div></div>
|
|
2801
2801
|
<div class="ttc" id="classSVF_1_1VFG_html_ac89b3917ed73ac70aac6205af8f7a4fe"><div class="ttname"><a href="classSVF_1_1VFG.html#ac89b3917ed73ac70aac6205af8f7a4fe">SVF::VFG::PAGNodeToDefMap</a></div><div class="ttdeci">PAGNodeToDefMapTy PAGNodeToDefMap</div><div class="ttdoc">map a pag node to its definition SVG node </div><div class="ttdef"><b>Definition:</b> <a href="VFG_8h_source.html#l00089">VFG.h:89</a></div></div>
|
|
2802
2802
|
</div><!-- fragment -->
|
|
2803
2803
|
</div>
|
|
@@ -3781,7 +3781,7 @@ Additional Inherited Members</h2></td></tr>
|
|
|
3781
3781
|
<p>Given a PAGNode, set/get its def <a class="el" href="classSVF_1_1VFG.html">VFG</a> node (definition of top level pointers) </p>
|
|
3782
3782
|
|
|
3783
3783
|
<p class="definition">Definition at line <a class="el" href="VFG_8h_source.html#l00401">401</a> of file <a class="el" href="VFG_8h_source.html">VFG.h</a>.</p>
|
|
3784
|
-
<div class="fragment"><div class="line"><a name="l00402"></a><span class="lineno"> 402</span>  {</div><div class="line"><a name="l00403"></a><span class="lineno"> 403</span>  PAGNodeToDefMapTy::iterator it = <a class="code" href="classSVF_1_1VFG.html#ac89b3917ed73ac70aac6205af8f7a4fe">PAGNodeToDefMap</a>.find(pagNode);</div><div class="line"><a name="l00404"></a><span class="lineno"> 404</span>  <span class="keywordflow">if</span>(it == <a class="code" href="classSVF_1_1VFG.html#ac89b3917ed73ac70aac6205af8f7a4fe">PAGNodeToDefMap</a>.end())</div><div class="line"><a name="l00405"></a><span class="lineno"> 405</span>  {</div><div class="line"><a name="l00406"></a><span class="lineno"> 406</span>  <a class="code" href="classSVF_1_1VFG.html#ac89b3917ed73ac70aac6205af8f7a4fe">PAGNodeToDefMap</a>[pagNode] = node->getId();</div><div class="line"><a name="l00407"></a><span class="lineno"> 407</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a>(<a class="code" href="classSVF_1_1VFG.html#a30eb9d717ad5bc8a9109a7bdef38f4a1">hasVFGNode</a>(node->getId()) && <span class="stringliteral">"not in the map!!"</span>);</div><div class="line"><a name="l00408"></a><span class="lineno"> 408</span>  }</div><div class="line"><a name="l00409"></a><span class="lineno"> 409</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00410"></a><span class="lineno"> 410</span>  {</div><div class="line"><a name="l00411"></a><span class="lineno"> 411</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a>((it->second == node->getId()) && <span class="stringliteral">"a
|
|
3784
|
+
<div class="fragment"><div class="line"><a name="l00402"></a><span class="lineno"> 402</span>  {</div><div class="line"><a name="l00403"></a><span class="lineno"> 403</span>  PAGNodeToDefMapTy::iterator it = <a class="code" href="classSVF_1_1VFG.html#ac89b3917ed73ac70aac6205af8f7a4fe">PAGNodeToDefMap</a>.find(pagNode);</div><div class="line"><a name="l00404"></a><span class="lineno"> 404</span>  <span class="keywordflow">if</span>(it == <a class="code" href="classSVF_1_1VFG.html#ac89b3917ed73ac70aac6205af8f7a4fe">PAGNodeToDefMap</a>.end())</div><div class="line"><a name="l00405"></a><span class="lineno"> 405</span>  {</div><div class="line"><a name="l00406"></a><span class="lineno"> 406</span>  <a class="code" href="classSVF_1_1VFG.html#ac89b3917ed73ac70aac6205af8f7a4fe">PAGNodeToDefMap</a>[pagNode] = node->getId();</div><div class="line"><a name="l00407"></a><span class="lineno"> 407</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a>(<a class="code" href="classSVF_1_1VFG.html#a30eb9d717ad5bc8a9109a7bdef38f4a1">hasVFGNode</a>(node->getId()) && <span class="stringliteral">"not in the map!!"</span>);</div><div class="line"><a name="l00408"></a><span class="lineno"> 408</span>  }</div><div class="line"><a name="l00409"></a><span class="lineno"> 409</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00410"></a><span class="lineno"> 410</span>  {</div><div class="line"><a name="l00411"></a><span class="lineno"> 411</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a>((it->second == node->getId()) && <span class="stringliteral">"a SVFVar can only have unique definition "</span>);</div><div class="line"><a name="l00412"></a><span class="lineno"> 412</span>  }</div><div class="line"><a name="l00413"></a><span class="lineno"> 413</span>  }</div><div class="ttc" id="util_8h_html_a07d17d6d5d1074c0969bc5d3c3d1d84a"><div class="ttname"><a href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a></div><div class="ttdeci">#define assert(ex)</div><div class="ttdef"><b>Definition:</b> <a href="util_8h_source.html#l00141">util.h:141</a></div></div>
|
|
3785
3785
|
<div class="ttc" id="classSVF_1_1VFG_html_ac89b3917ed73ac70aac6205af8f7a4fe"><div class="ttname"><a href="classSVF_1_1VFG.html#ac89b3917ed73ac70aac6205af8f7a4fe">SVF::VFG::PAGNodeToDefMap</a></div><div class="ttdeci">PAGNodeToDefMapTy PAGNodeToDefMap</div><div class="ttdoc">map a pag node to its definition SVG node </div><div class="ttdef"><b>Definition:</b> <a href="VFG_8h_source.html#l00089">VFG.h:89</a></div></div>
|
|
3786
3786
|
<div class="ttc" id="classSVF_1_1VFG_html_a30eb9d717ad5bc8a9109a7bdef38f4a1"><div class="ttname"><a href="classSVF_1_1VFG.html#a30eb9d717ad5bc8a9109a7bdef38f4a1">SVF::VFG::hasVFGNode</a></div><div class="ttdeci">bool hasVFGNode(NodeID id) const</div><div class="ttdoc">Whether has the VFGNode. </div><div class="ttdef"><b>Definition:</b> <a href="VFG_8h_source.html#l00151">VFG.h:151</a></div></div>
|
|
3787
3787
|
</div><!-- fragment -->
|
package/include/Graphs/VFG.h
CHANGED
|
@@ -408,13 +408,13 @@ protected:
|
|
|
408
408
|
}
|
|
409
409
|
else
|
|
410
410
|
{
|
|
411
|
-
assert((it->second == node->getId()) && "a
|
|
411
|
+
assert((it->second == node->getId()) && "a SVFVar can only have unique definition ");
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
414
|
inline NodeID getDef(const PAGNode* pagNode) const
|
|
415
415
|
{
|
|
416
416
|
PAGNodeToDefMapTy::const_iterator it = PAGNodeToDefMap.find(pagNode);
|
|
417
|
-
assert(it!=PAGNodeToDefMap.end() && "
|
|
417
|
+
assert(it!=PAGNodeToDefMap.end() && "SVFVar does not have a definition??");
|
|
418
418
|
return it->second;
|
|
419
419
|
}
|
|
420
420
|
inline bool hasDef(const PAGNode* pagNode) const
|
|
@@ -176,14 +176,18 @@ void ICFGBuilder::addICFGInterEdges(const Instruction* cs, const SVFFunction* ca
|
|
|
176
176
|
|
|
177
177
|
/// direct call
|
|
178
178
|
if(callee){
|
|
179
|
-
FunEntryICFGNode* calleeEntryNode = icfg->getFunEntryBlockNode(callee);
|
|
180
|
-
FunExitICFGNode* calleeExitNode = icfg->getFunExitBlockNode(callee);
|
|
181
|
-
icfg->addCallEdge(CallICFGNode, calleeEntryNode, cs);
|
|
182
|
-
icfg->addRetEdge(calleeExitNode, retBlockNode, cs);
|
|
183
179
|
/// if this is an external function (no function body)
|
|
184
180
|
if (isExtCall(callee))
|
|
185
181
|
{
|
|
186
|
-
icfg->addIntraEdge(
|
|
182
|
+
icfg->addIntraEdge(CallICFGNode, retBlockNode);
|
|
183
|
+
}
|
|
184
|
+
/// otherwise connect interprocedural edges
|
|
185
|
+
else
|
|
186
|
+
{
|
|
187
|
+
FunEntryICFGNode* calleeEntryNode = icfg->getFunEntryBlockNode(callee);
|
|
188
|
+
FunExitICFGNode* calleeExitNode = icfg->getFunExitBlockNode(callee);
|
|
189
|
+
icfg->addCallEdge(CallICFGNode, calleeEntryNode, cs);
|
|
190
|
+
icfg->addRetEdge(calleeExitNode, retBlockNode, cs);
|
|
187
191
|
}
|
|
188
192
|
}
|
|
189
193
|
/// indirect call (don't know callee)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svf-tools",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.357",
|
|
4
4
|
"description": "* <b>[TypeClone](https://github.com/SVF-tools/SVF/wiki/TypeClone) published in our [ECOOP paper](https://yuleisui.github.io/publications/ecoop20.pdf) is now available in SVF </b> * <b>SVF now uses a single script for its build. Just type [`source ./build.sh`](https://github.com/SVF-tools/SVF/blob/master/build.sh) in your terminal, that's it!</b> * <b>SVF now supports LLVM-10.0.0! </b> * <b>We thank [bsauce](https://github.com/bsauce) for writing a user manual of SVF ([link1](https://www.jianshu.com/p/068a08ec749c) and [link2](https://www.jianshu.com/p/777c30d4240e)) in Chinese </b> * <b>SVF now supports LLVM-9.0.0 (Thank [Byoungyoung Lee](https://github.com/SVF-tools/SVF/issues/142) for his help!). </b> * <b>SVF now supports a set of [field-sensitive pointer analyses](https://yuleisui.github.io/publications/sas2019a.pdf). </b> * <b>[Use SVF as an external lib](https://github.com/SVF-tools/SVF/wiki/Using-SVF-as-a-lib-in-your-own-tool) for your own project (Contributed by [Hongxu Chen](https://github.com/HongxuChen)). </b> * <b>SVF now supports LLVM-7.0.0. </b> * <b>SVF now supports Docker. [Try SVF in Docker](https://github.com/SVF-tools/SVF/wiki/Try-SVF-in-Docker)! </b> * <b>SVF now supports [LLVM-6.0.0](https://github.com/svf-tools/SVF/pull/38) (Contributed by [Jack Anthony](https://github.com/jackanth)). </b> * <b>SVF now supports [LLVM-4.0.0](https://github.com/svf-tools/SVF/pull/23) (Contributed by Jared Carlson. Thank [Jared](https://github.com/jcarlson23) and [Will](https://github.com/dtzWill) for their in-depth [discussions](https://github.com/svf-tools/SVF/pull/18) about updating SVF!) </b> * <b>SVF now supports analysis for C++ programs.</b> <br />",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|