svf-tools 1.0.489 → 1.0.492
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/ExtAPI_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/SVFIRBuilder_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/SymbolTableInfo_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ExtAPI.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ObjTypeInfo.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1SVFIRBuilder.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1SymbolTableInfo.html +1 -1
- package/include/Util/ExtAPI.json +6 -6
- package/lib/MemoryModel/SymbolTableInfo.cpp +3 -3
- package/lib/SVF-FE/SVFIRBuilder.cpp +2 -2
- package/lib/Util/ExtAPI.cpp +1 -1
- package/package.json +1 -1
|
@@ -1178,7 +1178,7 @@ Friends</h2></td></tr>
|
|
|
1178
1178
|
<p>Return the type of a flattened element given a flattened index. </p>
|
|
1179
1179
|
|
|
1180
1180
|
<p class="definition">Definition at line <a class="el" href="SymbolTableInfo_8cpp_source.html#l00406">406</a> of file <a class="el" href="SymbolTableInfo_8cpp_source.html">SymbolTableInfo.cpp</a>.</p>
|
|
1181
|
-
<div class="fragment"><div class="line"><a name="l00407"></a><span class="lineno"> 407</span> {</div><div class="line"><a name="l00408"></a><span class="lineno"> 408</span>  <span class="keywordflow">if</span>(<a class="code" href="classSVF_1_1Options.html#a170426acc0f9d99470fd1bde40d273e2">Options::ModelArrays</a>)</div><div class="line"><a name="l00409"></a><span class="lineno"> 409</span>  {</div><div class="line"><a name="l00410"></a><span class="lineno"> 410</span>  <span class="keyword">const</span> std::vector<const Type*>& so = <a class="code" href="classSVF_1_1SymbolTableInfo.html#aeb3f594076c60fc313c29d282f347f08">getStructInfoIter</a>(baseType)->second->getFlattenElementTypes();</div><div class="line"><a name="l00411"></a><span class="lineno"> 411</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a> (flatten_idx <= so.size() && !so.empty() && <span class="stringliteral">"element index out of bounds, can't get element type!"</span>);</div><div class="line"><a name="l00412"></a><span class="lineno"> 412</span>  <span class="keywordflow">return</span> so[flatten_idx];</div><div class="line"><a name="l00413"></a><span class="lineno"> 413</span>  }</div><div class="line"><a name="l00414"></a><span class="lineno"> 414</span>  <span class="keywordflow">else</span></div><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>  <span class="keyword">const</span> std::vector<const Type*>& so = <a class="code" href="classSVF_1_1SymbolTableInfo.html#aeb3f594076c60fc313c29d282f347f08">getStructInfoIter</a>(baseType)->second->getFlattenFieldTypes();</div><div class="line"><a name="l00417"></a><span class="lineno"> 417</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a> (flatten_idx <= so.size() && !so.empty() && <span class="stringliteral">"element index out of bounds, can't get element type!"</span>);</div><div class="line"><a name="l00418"></a><span class="lineno"> 418</span>  <span class="keywordflow">return</span> so[flatten_idx];</div><div class="line"><a name="l00419"></a><span class="lineno"> 419</span>  }</div><div class="line"><a name="l00420"></a><span class="lineno"> 420</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>
|
|
1181
|
+
<div class="fragment"><div class="line"><a name="l00407"></a><span class="lineno"> 407</span> {</div><div class="line"><a name="l00408"></a><span class="lineno"> 408</span>  <span class="keywordflow">if</span>(<a class="code" href="classSVF_1_1Options.html#a170426acc0f9d99470fd1bde40d273e2">Options::ModelArrays</a>)</div><div class="line"><a name="l00409"></a><span class="lineno"> 409</span>  {</div><div class="line"><a name="l00410"></a><span class="lineno"> 410</span>  <span class="keyword">const</span> std::vector<const Type*>& so = <a class="code" href="classSVF_1_1SymbolTableInfo.html#aeb3f594076c60fc313c29d282f347f08">getStructInfoIter</a>(baseType)->second->getFlattenElementTypes();</div><div class="line"><a name="l00411"></a><span class="lineno"> 411</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a> (flatten_idx <= so.size() && !so.empty() && <span class="stringliteral">"element index out of bounds or struct opaque type, can't get element type!"</span>);</div><div class="line"><a name="l00412"></a><span class="lineno"> 412</span>  <span class="keywordflow">return</span> so[flatten_idx];</div><div class="line"><a name="l00413"></a><span class="lineno"> 413</span>  }</div><div class="line"><a name="l00414"></a><span class="lineno"> 414</span>  <span class="keywordflow">else</span></div><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>  <span class="keyword">const</span> std::vector<const Type*>& so = <a class="code" href="classSVF_1_1SymbolTableInfo.html#aeb3f594076c60fc313c29d282f347f08">getStructInfoIter</a>(baseType)->second->getFlattenFieldTypes();</div><div class="line"><a name="l00417"></a><span class="lineno"> 417</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a> (flatten_idx <= so.size() && !so.empty() && <span class="stringliteral">"element index out of bounds or struct opaque type, can't get element type!"</span>);</div><div class="line"><a name="l00418"></a><span class="lineno"> 418</span>  <span class="keywordflow">return</span> so[flatten_idx];</div><div class="line"><a name="l00419"></a><span class="lineno"> 419</span>  }</div><div class="line"><a name="l00420"></a><span class="lineno"> 420</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>
|
|
1182
1182
|
<div class="ttc" id="classSVF_1_1SymbolTableInfo_html_aeb3f594076c60fc313c29d282f347f08"><div class="ttname"><a href="classSVF_1_1SymbolTableInfo.html#aeb3f594076c60fc313c29d282f347f08">SVF::SymbolTableInfo::getStructInfoIter</a></div><div class="ttdeci">TypeToFieldInfoMap::iterator getStructInfoIter(const Type *T)</div><div class="ttdoc">Get struct info. </div><div class="ttdef"><b>Definition:</b> <a href="SymbolTableInfo_8cpp_source.html#l00078">SymbolTableInfo.cpp:78</a></div></div>
|
|
1183
1183
|
<div class="ttc" id="classSVF_1_1Options_html_a170426acc0f9d99470fd1bde40d273e2"><div class="ttname"><a href="classSVF_1_1Options.html#a170426acc0f9d99470fd1bde40d273e2">SVF::Options::ModelArrays</a></div><div class="ttdeci">static const llvm::cl::opt< bool > ModelArrays</div><div class="ttdef"><b>Definition:</b> <a href="Options_8h_source.html#l00217">Options.h:217</a></div></div>
|
|
1184
1184
|
</div><!-- fragment -->
|
package/include/Util/ExtAPI.json
CHANGED
|
@@ -3194,32 +3194,32 @@
|
|
|
3194
3194
|
"_ZNSsC1EPKcRKSaIcE":{
|
|
3195
3195
|
"type": "CPP_EFT_A0R_A1",
|
|
3196
3196
|
"overwrite_app_function": 0,
|
|
3197
|
-
"store": ["
|
|
3197
|
+
"store": ["A1", "A0"]
|
|
3198
3198
|
},
|
|
3199
3199
|
"_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcRKS3_":{
|
|
3200
3200
|
"type": "CPP_EFT_A0R_A1",
|
|
3201
3201
|
"overwrite_app_function": 0,
|
|
3202
|
-
"store": ["
|
|
3202
|
+
"store": ["A1", "A0"]
|
|
3203
3203
|
},
|
|
3204
3204
|
"_ZNSsC1EPKcmRKSaIcE":{
|
|
3205
3205
|
"type": "CPP_EFT_A0R_A1",
|
|
3206
3206
|
"overwrite_app_function": 0,
|
|
3207
|
-
"store": ["
|
|
3207
|
+
"store": ["A1", "A0"]
|
|
3208
3208
|
},
|
|
3209
3209
|
"_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcmRKS3_":{
|
|
3210
3210
|
"type": "CPP_EFT_A0R_A1",
|
|
3211
3211
|
"overwrite_app_function": 0,
|
|
3212
|
-
"store": ["
|
|
3212
|
+
"store": ["A1", "A0"]
|
|
3213
3213
|
},
|
|
3214
3214
|
"_ZNSsaSEPKc":{
|
|
3215
3215
|
"type": "CPP_EFT_A0R_A1",
|
|
3216
3216
|
"overwrite_app_function": 0,
|
|
3217
|
-
"store": ["
|
|
3217
|
+
"store": ["A1", "A0"]
|
|
3218
3218
|
},
|
|
3219
3219
|
"_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc":{
|
|
3220
3220
|
"type": "CPP_EFT_A0R_A1",
|
|
3221
3221
|
"overwrite_app_function": 0,
|
|
3222
|
-
"store": ["
|
|
3222
|
+
"store": ["A1", "A0"]
|
|
3223
3223
|
},
|
|
3224
3224
|
"_ZNSsC1ERKSs":{
|
|
3225
3225
|
"type": "CPP_EFT_A0R_A1R",
|
|
@@ -408,13 +408,13 @@ const Type* SymbolTableInfo::getFlatternedElemType(const Type* baseType, u32_t f
|
|
|
408
408
|
if(Options::ModelArrays)
|
|
409
409
|
{
|
|
410
410
|
const std::vector<const Type*>& so = getStructInfoIter(baseType)->second->getFlattenElementTypes();
|
|
411
|
-
assert (flatten_idx <= so.size() && !so.empty() && "element index out of bounds, can't get element type!");
|
|
411
|
+
assert (flatten_idx <= so.size() && !so.empty() && "element index out of bounds or struct opaque type, can't get element type!");
|
|
412
412
|
return so[flatten_idx];
|
|
413
413
|
}
|
|
414
414
|
else
|
|
415
415
|
{
|
|
416
416
|
const std::vector<const Type*>& so = getStructInfoIter(baseType)->second->getFlattenFieldTypes();
|
|
417
|
-
assert (flatten_idx <= so.size() && !so.empty() && "element index out of bounds, can't get element type!");
|
|
417
|
+
assert (flatten_idx <= so.size() && !so.empty() && "element index out of bounds or struct opaque type, can't get element type!");
|
|
418
418
|
return so[flatten_idx];
|
|
419
419
|
}
|
|
420
420
|
}
|
|
@@ -590,7 +590,7 @@ bool ObjTypeInfo::isNonPtrFieldObj(const LocationSet& ls)
|
|
|
590
590
|
ety = AT->getElementType();
|
|
591
591
|
}
|
|
592
592
|
|
|
593
|
-
if (SVFUtil::isa<StructType>(ety) || SVFUtil::isa<ArrayType>(ety))
|
|
593
|
+
if ((SVFUtil::isa<StructType>(ety) && !SVFUtil::cast<StructType>(ety)->isOpaque()) || SVFUtil::isa<ArrayType>(ety))
|
|
594
594
|
{
|
|
595
595
|
const Type* elemTy = SymbolTableInfo::SymbolInfo()->getFlatternedElemType(ety, ls.accumulateConstantFieldIdx());
|
|
596
596
|
if(elemTy->isPointerTy())
|
|
@@ -1275,9 +1275,9 @@ void SVFIRBuilder::handleExtCall(CallSite cs, const SVFFunction *callee)
|
|
|
1275
1275
|
}
|
|
1276
1276
|
case ExtAPI::EXT_LOADSTORE:
|
|
1277
1277
|
{
|
|
1278
|
-
NodeID
|
|
1278
|
+
NodeID vnS = parseNode(args[0], cs, inst);
|
|
1279
1279
|
NodeID vnV = parseNode(args[1], cs, inst);
|
|
1280
|
-
NodeID
|
|
1280
|
+
NodeID vnD = parseNode(args[2], cs, inst);
|
|
1281
1281
|
if (vnD && vnV && vnS)
|
|
1282
1282
|
{
|
|
1283
1283
|
addLoadEdge(vnS, vnV);
|
package/lib/Util/ExtAPI.cpp
CHANGED
|
@@ -172,7 +172,7 @@ cJSON *ExtAPI::get_FunJson(const std::string funName)
|
|
|
172
172
|
}
|
|
173
173
|
free(jsonStr);
|
|
174
174
|
}
|
|
175
|
-
return
|
|
175
|
+
return cJSON_GetObjectItemCaseSensitive(root, funName.c_str());
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
// Get arguments of the operation, e.g. ["A1R", "A0", "A2"]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svf-tools",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.492",
|
|
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": {
|