svf-tools 1.0.913 → 1.0.914
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/AbstractInterpretation_8cpp.html +6 -4
- package/SVF-doxygen/html/AbstractInterpretation_8cpp_source.html +1592 -1609
- package/SVF-doxygen/html/AbstractInterpretation_8h_source.html +157 -144
- package/SVF-doxygen/html/BufOverflowChecker_8cpp_source.html +797 -786
- package/SVF-doxygen/html/BufOverflowChecker_8h_source.html +7 -7
- package/SVF-doxygen/html/SVFIR2AbsState_8cpp_source.html +815 -826
- package/SVF-doxygen/html/SVFIR2AbsState_8h_source.html +153 -196
- package/SVF-doxygen/html/classSVF_1_1AEStat.html +116 -120
- package/SVF-doxygen/html/classSVF_1_1AbstractInterpretation-members.html +32 -32
- package/SVF-doxygen/html/classSVF_1_1AbstractInterpretation.html +1736 -1681
- package/SVF-doxygen/html/classSVF_1_1BufOverflowChecker-members.html +32 -32
- package/SVF-doxygen/html/classSVF_1_1BufOverflowChecker.html +471 -462
- package/SVF-doxygen/html/classSVF_1_1SVFIR2AbsState-members.html +35 -47
- package/SVF-doxygen/html/classSVF_1_1SVFIR2AbsState.html +1261 -1546
- package/SVF-doxygen/html/dir_9a8e7a56f4029a0d9f62b1c6d1f6e85b.html +0 -2
- package/SVF-doxygen/html/files.html +0 -1
- package/SVF-doxygen/html/functions.html +4 -7
- package/SVF-doxygen/html/functions_a.html +2 -2
- package/SVF-doxygen/html/functions_f.html +3 -3
- package/SVF-doxygen/html/functions_func.html +2 -2
- package/SVF-doxygen/html/functions_func_g.html +40 -40
- package/SVF-doxygen/html/functions_func_h.html +21 -57
- package/SVF-doxygen/html/functions_func_i.html +23 -14
- package/SVF-doxygen/html/functions_func_n.html +1 -1
- package/SVF-doxygen/html/functions_func_s.html +13 -19
- package/SVF-doxygen/html/functions_func_t.html +1 -1
- package/SVF-doxygen/html/functions_func_w.html +1 -1
- package/SVF-doxygen/html/functions_g.html +35 -35
- package/SVF-doxygen/html/functions_h.html +18 -54
- package/SVF-doxygen/html/functions_i.html +32 -23
- package/SVF-doxygen/html/functions_l.html +3 -3
- package/SVF-doxygen/html/functions_n.html +1 -1
- package/SVF-doxygen/html/functions_o.html +4 -4
- package/SVF-doxygen/html/functions_p.html +16 -14
- package/SVF-doxygen/html/functions_r.html +6 -6
- package/SVF-doxygen/html/functions_s.html +22 -26
- package/SVF-doxygen/html/functions_t.html +13 -13
- package/SVF-doxygen/html/functions_v.html +3 -3
- package/SVF-doxygen/html/functions_vars.html +4 -7
- package/SVF-doxygen/html/functions_w.html +1 -1
- package/SVF-doxygen/html/search/all_0.js +131 -132
- package/SVF-doxygen/html/search/all_1.js +504 -504
- package/SVF-doxygen/html/search/all_10.js +326 -326
- package/SVF-doxygen/html/search/all_11.js +227 -227
- package/SVF-doxygen/html/search/all_12.js +559 -562
- package/SVF-doxygen/html/search/all_13.js +186 -186
- package/SVF-doxygen/html/search/all_14.js +74 -74
- package/SVF-doxygen/html/search/all_15.js +175 -175
- package/SVF-doxygen/html/search/all_16.js +77 -77
- package/SVF-doxygen/html/search/all_17.js +1 -1
- package/SVF-doxygen/html/search/all_18.js +1 -1
- package/SVF-doxygen/html/search/all_19.js +27 -27
- package/SVF-doxygen/html/search/all_1a.js +174 -174
- package/SVF-doxygen/html/search/all_2.js +180 -180
- package/SVF-doxygen/html/search/all_3.js +635 -635
- package/SVF-doxygen/html/search/all_4.js +237 -237
- package/SVF-doxygen/html/search/all_5.js +120 -120
- package/SVF-doxygen/html/search/all_6.js +236 -236
- package/SVF-doxygen/html/search/all_7.js +1039 -1039
- package/SVF-doxygen/html/search/all_8.js +212 -224
- package/SVF-doxygen/html/search/all_9.js +630 -627
- package/SVF-doxygen/html/search/all_a.js +46 -46
- package/SVF-doxygen/html/search/all_b.js +24 -24
- package/SVF-doxygen/html/search/all_c.js +111 -111
- package/SVF-doxygen/html/search/all_d.js +204 -204
- package/SVF-doxygen/html/search/all_e.js +207 -207
- package/SVF-doxygen/html/search/all_f.js +122 -122
- package/SVF-doxygen/html/search/classes_0.js +29 -29
- package/SVF-doxygen/html/search/classes_1.js +11 -11
- package/SVF-doxygen/html/search/classes_10.js +71 -71
- package/SVF-doxygen/html/search/classes_11.js +14 -14
- package/SVF-doxygen/html/search/classes_12.js +2 -2
- package/SVF-doxygen/html/search/classes_13.js +10 -10
- package/SVF-doxygen/html/search/classes_14.js +19 -19
- package/SVF-doxygen/html/search/classes_15.js +1 -1
- package/SVF-doxygen/html/search/classes_2.js +72 -72
- package/SVF-doxygen/html/search/classes_3.js +35 -35
- package/SVF-doxygen/html/search/classes_4.js +7 -7
- package/SVF-doxygen/html/search/classes_5.js +28 -28
- package/SVF-doxygen/html/search/classes_6.js +98 -98
- package/SVF-doxygen/html/search/classes_7.js +33 -33
- package/SVF-doxygen/html/search/classes_8.js +57 -57
- package/SVF-doxygen/html/search/classes_9.js +1 -1
- package/SVF-doxygen/html/search/classes_a.js +12 -12
- package/SVF-doxygen/html/search/classes_b.js +29 -29
- package/SVF-doxygen/html/search/classes_c.js +6 -6
- package/SVF-doxygen/html/search/classes_d.js +19 -19
- package/SVF-doxygen/html/search/classes_e.js +36 -36
- package/SVF-doxygen/html/search/classes_f.js +25 -25
- package/SVF-doxygen/html/search/defines_0.js +3 -3
- package/SVF-doxygen/html/search/defines_1.js +3 -3
- package/SVF-doxygen/html/search/defines_10.js +2 -2
- package/SVF-doxygen/html/search/defines_2.js +30 -30
- package/SVF-doxygen/html/search/defines_3.js +20 -20
- package/SVF-doxygen/html/search/defines_4.js +3 -3
- package/SVF-doxygen/html/search/defines_5.js +4 -4
- package/SVF-doxygen/html/search/defines_6.js +2 -2
- package/SVF-doxygen/html/search/defines_7.js +5 -5
- package/SVF-doxygen/html/search/defines_8.js +11 -11
- package/SVF-doxygen/html/search/defines_9.js +9 -9
- package/SVF-doxygen/html/search/defines_a.js +2 -2
- package/SVF-doxygen/html/search/defines_b.js +1 -1
- package/SVF-doxygen/html/search/defines_c.js +3 -3
- package/SVF-doxygen/html/search/defines_d.js +2 -2
- package/SVF-doxygen/html/search/defines_e.js +8 -8
- package/SVF-doxygen/html/search/defines_f.js +4 -4
- package/SVF-doxygen/html/search/enums_0.js +3 -3
- package/SVF-doxygen/html/search/enums_1.js +2 -2
- package/SVF-doxygen/html/search/enums_10.js +1 -1
- package/SVF-doxygen/html/search/enums_11.js +1 -1
- package/SVF-doxygen/html/search/enums_2.js +9 -9
- package/SVF-doxygen/html/search/enums_3.js +2 -2
- package/SVF-doxygen/html/search/enums_4.js +3 -3
- package/SVF-doxygen/html/search/enums_5.js +1 -1
- package/SVF-doxygen/html/search/enums_6.js +2 -2
- package/SVF-doxygen/html/search/enums_7.js +2 -2
- package/SVF-doxygen/html/search/enums_8.js +4 -4
- package/SVF-doxygen/html/search/enums_9.js +1 -1
- package/SVF-doxygen/html/search/enums_a.js +1 -1
- package/SVF-doxygen/html/search/enums_b.js +7 -7
- package/SVF-doxygen/html/search/enums_c.js +1 -1
- package/SVF-doxygen/html/search/enums_d.js +4 -4
- package/SVF-doxygen/html/search/enums_e.js +2 -2
- package/SVF-doxygen/html/search/enums_f.js +4 -4
- package/SVF-doxygen/html/search/enumvalues_0.js +15 -15
- package/SVF-doxygen/html/search/enumvalues_1.js +16 -16
- package/SVF-doxygen/html/search/enumvalues_10.js +36 -36
- package/SVF-doxygen/html/search/enumvalues_11.js +6 -6
- package/SVF-doxygen/html/search/enumvalues_12.js +10 -10
- package/SVF-doxygen/html/search/enumvalues_13.js +1 -1
- package/SVF-doxygen/html/search/enumvalues_14.js +1 -1
- package/SVF-doxygen/html/search/enumvalues_15.js +4 -4
- package/SVF-doxygen/html/search/enumvalues_2.js +36 -36
- package/SVF-doxygen/html/search/enumvalues_3.js +13 -13
- package/SVF-doxygen/html/search/enumvalues_4.js +2 -2
- package/SVF-doxygen/html/search/enumvalues_5.js +50 -50
- package/SVF-doxygen/html/search/enumvalues_6.js +6 -6
- package/SVF-doxygen/html/search/enumvalues_7.js +8 -8
- package/SVF-doxygen/html/search/enumvalues_8.js +24 -24
- package/SVF-doxygen/html/search/enumvalues_9.js +6 -6
- package/SVF-doxygen/html/search/enumvalues_a.js +17 -17
- package/SVF-doxygen/html/search/enumvalues_b.js +11 -11
- package/SVF-doxygen/html/search/enumvalues_c.js +5 -5
- package/SVF-doxygen/html/search/enumvalues_d.js +19 -19
- package/SVF-doxygen/html/search/enumvalues_e.js +9 -9
- package/SVF-doxygen/html/search/enumvalues_f.js +48 -48
- package/SVF-doxygen/html/search/files_0.js +18 -18
- package/SVF-doxygen/html/search/files_1.js +9 -9
- package/SVF-doxygen/html/search/files_10.js +8 -8
- package/SVF-doxygen/html/search/files_11.js +8 -8
- package/SVF-doxygen/html/search/files_12.js +2 -2
- package/SVF-doxygen/html/search/files_2.js +51 -51
- package/SVF-doxygen/html/search/files_3.js +14 -14
- package/SVF-doxygen/html/search/files_4.js +3 -3
- package/SVF-doxygen/html/search/files_5.js +13 -13
- package/SVF-doxygen/html/search/files_6.js +10 -10
- package/SVF-doxygen/html/search/files_7.js +15 -15
- package/SVF-doxygen/html/search/files_8.js +13 -13
- package/SVF-doxygen/html/search/files_9.js +18 -18
- package/SVF-doxygen/html/search/files_a.js +3 -3
- package/SVF-doxygen/html/search/files_b.js +4 -4
- package/SVF-doxygen/html/search/files_c.js +20 -20
- package/SVF-doxygen/html/search/files_d.js +4 -4
- package/SVF-doxygen/html/search/files_e.js +56 -57
- package/SVF-doxygen/html/search/files_f.js +8 -8
- package/SVF-doxygen/html/search/functions_0.js +13 -13
- package/SVF-doxygen/html/search/functions_1.js +366 -366
- package/SVF-doxygen/html/search/functions_10.js +140 -140
- package/SVF-doxygen/html/search/functions_11.js +140 -140
- package/SVF-doxygen/html/search/functions_12.js +291 -293
- package/SVF-doxygen/html/search/functions_13.js +52 -52
- package/SVF-doxygen/html/search/functions_14.js +41 -41
- package/SVF-doxygen/html/search/functions_15.js +70 -70
- package/SVF-doxygen/html/search/functions_16.js +38 -38
- package/SVF-doxygen/html/search/functions_17.js +3 -3
- package/SVF-doxygen/html/search/functions_18.js +174 -174
- package/SVF-doxygen/html/search/functions_2.js +92 -92
- package/SVF-doxygen/html/search/functions_3.js +257 -257
- package/SVF-doxygen/html/search/functions_4.js +85 -85
- package/SVF-doxygen/html/search/functions_5.js +54 -54
- package/SVF-doxygen/html/search/functions_6.js +65 -65
- package/SVF-doxygen/html/search/functions_7.js +857 -857
- package/SVF-doxygen/html/search/functions_8.js +164 -176
- package/SVF-doxygen/html/search/functions_9.js +439 -436
- package/SVF-doxygen/html/search/functions_a.js +30 -30
- package/SVF-doxygen/html/search/functions_b.js +2 -2
- package/SVF-doxygen/html/search/functions_c.js +22 -22
- package/SVF-doxygen/html/search/functions_d.js +81 -81
- package/SVF-doxygen/html/search/functions_e.js +34 -34
- package/SVF-doxygen/html/search/functions_f.js +58 -58
- package/SVF-doxygen/html/search/namespaces_0.js +1 -1
- package/SVF-doxygen/html/search/namespaces_1.js +7 -7
- package/SVF-doxygen/html/search/related_0.js +4 -4
- package/SVF-doxygen/html/search/related_1.js +2 -2
- package/SVF-doxygen/html/search/related_2.js +2 -2
- package/SVF-doxygen/html/search/related_3.js +2 -2
- package/SVF-doxygen/html/search/related_4.js +2 -2
- package/SVF-doxygen/html/search/related_5.js +1 -1
- package/SVF-doxygen/html/search/related_6.js +2 -2
- package/SVF-doxygen/html/search/related_7.js +5 -5
- package/SVF-doxygen/html/search/related_8.js +2 -2
- package/SVF-doxygen/html/search/related_9.js +4 -4
- package/SVF-doxygen/html/search/related_a.js +19 -19
- package/SVF-doxygen/html/search/related_b.js +4 -4
- package/SVF-doxygen/html/search/related_c.js +2 -2
- package/SVF-doxygen/html/search/related_d.js +11 -11
- package/SVF-doxygen/html/search/related_e.js +2 -2
- package/SVF-doxygen/html/search/related_f.js +2 -2
- package/SVF-doxygen/html/search/typedefs_0.js +20 -20
- package/SVF-doxygen/html/search/typedefs_1.js +27 -27
- package/SVF-doxygen/html/search/typedefs_10.js +65 -65
- package/SVF-doxygen/html/search/typedefs_11.js +12 -12
- package/SVF-doxygen/html/search/typedefs_12.js +13 -13
- package/SVF-doxygen/html/search/typedefs_13.js +40 -40
- package/SVF-doxygen/html/search/typedefs_14.js +11 -11
- package/SVF-doxygen/html/search/typedefs_2.js +125 -125
- package/SVF-doxygen/html/search/typedefs_3.js +39 -39
- package/SVF-doxygen/html/search/typedefs_4.js +17 -17
- package/SVF-doxygen/html/search/typedefs_5.js +42 -42
- package/SVF-doxygen/html/search/typedefs_6.js +54 -54
- package/SVF-doxygen/html/search/typedefs_7.js +47 -47
- package/SVF-doxygen/html/search/typedefs_8.js +1 -1
- package/SVF-doxygen/html/search/typedefs_9.js +4 -4
- package/SVF-doxygen/html/search/typedefs_a.js +28 -28
- package/SVF-doxygen/html/search/typedefs_b.js +29 -29
- package/SVF-doxygen/html/search/typedefs_c.js +41 -41
- package/SVF-doxygen/html/search/typedefs_d.js +15 -15
- package/SVF-doxygen/html/search/typedefs_e.js +52 -52
- package/SVF-doxygen/html/search/typedefs_f.js +14 -14
- package/SVF-doxygen/html/search/variables_0.js +169 -170
- package/SVF-doxygen/html/search/variables_1.js +78 -78
- package/SVF-doxygen/html/search/variables_10.js +98 -98
- package/SVF-doxygen/html/search/variables_11.js +47 -47
- package/SVF-doxygen/html/search/variables_12.js +93 -93
- package/SVF-doxygen/html/search/variables_13.js +76 -76
- package/SVF-doxygen/html/search/variables_14.js +14 -14
- package/SVF-doxygen/html/search/variables_15.js +49 -49
- package/SVF-doxygen/html/search/variables_16.js +11 -11
- package/SVF-doxygen/html/search/variables_17.js +1 -1
- package/SVF-doxygen/html/search/variables_18.js +17 -17
- package/SVF-doxygen/html/search/variables_2.js +40 -40
- package/SVF-doxygen/html/search/variables_3.js +143 -143
- package/SVF-doxygen/html/search/variables_4.js +51 -51
- package/SVF-doxygen/html/search/variables_5.js +39 -39
- package/SVF-doxygen/html/search/variables_6.js +66 -66
- package/SVF-doxygen/html/search/variables_7.js +32 -32
- package/SVF-doxygen/html/search/variables_8.js +8 -8
- package/SVF-doxygen/html/search/variables_9.js +80 -80
- package/SVF-doxygen/html/search/variables_a.js +4 -4
- package/SVF-doxygen/html/search/variables_b.js +10 -10
- package/SVF-doxygen/html/search/variables_c.js +44 -44
- package/SVF-doxygen/html/search/variables_d.js +58 -58
- package/SVF-doxygen/html/search/variables_e.js +123 -123
- package/SVF-doxygen/html/search/variables_f.js +31 -31
- package/SVF-doxygen/html/svf-ex_8cpp.html +199 -197
- package/SVF-doxygen/html/svf-ex_8cpp_source.html +204 -202
- package/package.json +1 -1
- package/svf/include/AE/Svfexe/AbstractInterpretation.h +28 -21
- package/svf/include/AE/Svfexe/SVFIR2AbsState.h +37 -67
- package/svf/lib/AE/Svfexe/AbstractInterpretation.cpp +123 -139
- package/svf/lib/AE/Svfexe/BufOverflowChecker.cpp +52 -42
- package/svf/lib/AE/Svfexe/SVFIR2AbsState.cpp +134 -146
- package/svf-llvm/tools/Example/svf-ex.cpp +13 -12
- package/svf/lib/AE/Core/SVFIR2Relation.cpp +0 -193
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svf-tools",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.914",
|
|
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": {
|
|
@@ -154,7 +154,7 @@ protected:
|
|
|
154
154
|
* @param intraEdge the edge from CmpStmt to the next node
|
|
155
155
|
* @return if this edge is feasible
|
|
156
156
|
*/
|
|
157
|
-
bool
|
|
157
|
+
bool isBranchFeasible(const IntraCFGEdge* intraEdge, AbstractState& es);
|
|
158
158
|
|
|
159
159
|
/**
|
|
160
160
|
* handle instructions in ICFGNode
|
|
@@ -205,12 +205,6 @@ protected:
|
|
|
205
205
|
*/
|
|
206
206
|
virtual void SkipRecursiveCall(const CallICFGNode* callnode);
|
|
207
207
|
|
|
208
|
-
/**
|
|
209
|
-
* Check if this function is recursive function and skip it.
|
|
210
|
-
*
|
|
211
|
-
* @param func SVFFunction is a recursive function
|
|
212
|
-
*/
|
|
213
|
-
virtual void SkipRecursiveFunc(const SVFFunction* func);
|
|
214
208
|
|
|
215
209
|
/**
|
|
216
210
|
* Check if this cmpStmt and succ are satisfiable to the execution state.
|
|
@@ -219,8 +213,8 @@ protected:
|
|
|
219
213
|
* @param succ the value of cmpStmt (True or False)
|
|
220
214
|
* @return if this ICFGNode has preceding execution state
|
|
221
215
|
*/
|
|
222
|
-
bool
|
|
223
|
-
|
|
216
|
+
bool isCmpBranchFeasible(const CmpStmt* cmpStmt, s64_t succ,
|
|
217
|
+
AbstractState& es);
|
|
224
218
|
|
|
225
219
|
/**
|
|
226
220
|
* Check if this SwitchInst and succ are satisfiable to the execution state.
|
|
@@ -229,8 +223,8 @@ protected:
|
|
|
229
223
|
* @param succ the case value of switch inst
|
|
230
224
|
* @return if this ICFGNode has preceding execution state
|
|
231
225
|
*/
|
|
232
|
-
bool
|
|
233
|
-
|
|
226
|
+
bool isSwitchBranchFeasible(const SVFVar* var, s64_t succ,
|
|
227
|
+
AbstractState& es);
|
|
234
228
|
|
|
235
229
|
|
|
236
230
|
/**
|
|
@@ -254,7 +248,7 @@ protected:
|
|
|
254
248
|
* @param addr Address Stmt like malloc/calloc/ALLOCA/StackAlloc
|
|
255
249
|
* @return the byte size e.g. int32_t a[10] -> return 40
|
|
256
250
|
*/
|
|
257
|
-
u32_t getAllocaInstByteSize(const AddrStmt *addr);
|
|
251
|
+
u32_t getAllocaInstByteSize(AbstractState& es, const AddrStmt *addr);
|
|
258
252
|
|
|
259
253
|
/**
|
|
260
254
|
* get byte size of alloca inst
|
|
@@ -263,7 +257,7 @@ protected:
|
|
|
263
257
|
* @param rhs SVFValue of string
|
|
264
258
|
* @return the string
|
|
265
259
|
*/
|
|
266
|
-
std::string strRead(const SVFValue* rhs);
|
|
260
|
+
std::string strRead(AbstractState& es,const SVFValue* rhs);
|
|
267
261
|
|
|
268
262
|
/**
|
|
269
263
|
* get length of string
|
|
@@ -272,7 +266,7 @@ protected:
|
|
|
272
266
|
* @param strValue SVFValue of string
|
|
273
267
|
* @return AbstractValue of string length
|
|
274
268
|
*/
|
|
275
|
-
AbstractValue getStrlen(const SVF::SVFValue *strValue);
|
|
269
|
+
AbstractValue getStrlen(AbstractState& es, const SVF::SVFValue *strValue);
|
|
276
270
|
|
|
277
271
|
/**
|
|
278
272
|
* get memory allocation size
|
|
@@ -283,7 +277,7 @@ protected:
|
|
|
283
277
|
* @param value to be traced
|
|
284
278
|
* @return AbstractValue of allocation size
|
|
285
279
|
*/
|
|
286
|
-
AbstractValue traceMemoryAllocationSize(const SVFValue *value);
|
|
280
|
+
AbstractValue traceMemoryAllocationSize(AbstractState& es, const SVFValue *value);
|
|
287
281
|
/**
|
|
288
282
|
* execute strcpy in abstract execution
|
|
289
283
|
* e.g arr = new char[10]
|
|
@@ -310,7 +304,7 @@ protected:
|
|
|
310
304
|
* we can set arr[3]='d', arr[4]='e', arr[5]='\0'
|
|
311
305
|
* @param call callnode of memcpy like api
|
|
312
306
|
*/
|
|
313
|
-
virtual void handleMemcpy(const SVFValue* dst, const SVFValue* src, AbstractValue len, u32_t start_idx);
|
|
307
|
+
virtual void handleMemcpy(AbstractState& es, const SVFValue* dst, const SVFValue* src, AbstractValue len, u32_t start_idx);
|
|
314
308
|
/**
|
|
315
309
|
* execute memset in abstract execution
|
|
316
310
|
* e.g arr = new char[10]
|
|
@@ -318,7 +312,7 @@ protected:
|
|
|
318
312
|
* we can set arr[0]='c', arr[1]='c', arr[2]='\0'
|
|
319
313
|
* @param call callnode of memset like api
|
|
320
314
|
*/
|
|
321
|
-
virtual void handleMemset(const SVFValue* dst, AbstractValue elem, AbstractValue len);
|
|
315
|
+
virtual void handleMemset(AbstractState& es, const SVFValue* dst, AbstractValue elem, AbstractValue len);
|
|
322
316
|
|
|
323
317
|
/**
|
|
324
318
|
* if this NodeID in SVFIR is a pointer, get the pointee type
|
|
@@ -327,14 +321,14 @@ protected:
|
|
|
327
321
|
* we can set arr[0]='c', arr[1]='c', arr[2]='\0'
|
|
328
322
|
* @param call callnode of memset like api
|
|
329
323
|
*/
|
|
330
|
-
const SVFType* getPointeeElement(NodeID id);
|
|
324
|
+
const SVFType* getPointeeElement(AbstractState& es, NodeID id);
|
|
331
325
|
|
|
332
326
|
void collectCheckPoint();
|
|
333
327
|
void checkPointAllSet();
|
|
334
328
|
// helper functions for traceMemoryAllocationSize and canSafelyAccessMemory
|
|
335
329
|
void AccessMemoryViaRetNode(const CallICFGNode *callnode, SVF::FILOWorkList<const SVFValue *>& worklist, Set<const SVFValue *>& visited);
|
|
336
330
|
void AccessMemoryViaCopyStmt(const CopyStmt *copy, SVF::FILOWorkList<const SVFValue *>& worklist, Set<const SVFValue *>& visited);
|
|
337
|
-
void AccessMemoryViaLoadStmt(const LoadStmt *load, SVF::FILOWorkList<const SVFValue *>& worklist, Set<const SVFValue *>& visited);
|
|
331
|
+
void AccessMemoryViaLoadStmt(AbstractState& es, const LoadStmt *load, SVF::FILOWorkList<const SVFValue *>& worklist, Set<const SVFValue *>& visited);
|
|
338
332
|
void AccessMemoryViaCallArgs(const SVF::SVFArgument *arg, SVF::FILOWorkList<const SVFValue *>& worklist, Set<const SVFValue *>& visited);
|
|
339
333
|
|
|
340
334
|
|
|
@@ -375,13 +369,26 @@ protected:
|
|
|
375
369
|
bool narrowFixpointPass(const ICFGNode* cycle_head,
|
|
376
370
|
AbstractState& pre_es);
|
|
377
371
|
|
|
372
|
+
AbstractState& getState(const ICFGNode* node)
|
|
373
|
+
{
|
|
374
|
+
const ICFGNode* repNode = _icfg->getRepNode(node);
|
|
375
|
+
if (_postAbsTrace.count(repNode) == 0)
|
|
376
|
+
{
|
|
377
|
+
assert(0 && "No preAbsTrace for this node");
|
|
378
|
+
}
|
|
379
|
+
else
|
|
380
|
+
{
|
|
381
|
+
return _postAbsTrace[repNode];
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
|
|
378
385
|
protected:
|
|
379
386
|
// there data should be shared with subclasses
|
|
380
387
|
Map<std::string, std::function<void(const CallSite &)>> _func_map;
|
|
381
388
|
Set<const CallICFGNode*> _checkpoints;
|
|
382
389
|
Set<std::string> _checkpoint_names;
|
|
383
|
-
Map<const ICFGNode*, AbstractState>
|
|
384
|
-
Map<const ICFGNode*, AbstractState>
|
|
390
|
+
Map<const ICFGNode*, AbstractState> _preAbsTrace;
|
|
391
|
+
Map<const ICFGNode*, AbstractState> _postAbsTrace;
|
|
385
392
|
std::string _moduleName;
|
|
386
393
|
};
|
|
387
394
|
}
|
|
@@ -46,15 +46,6 @@ public:
|
|
|
46
46
|
public:
|
|
47
47
|
SVFIR2AbsState(SVFIR *ir) : _svfir(ir) {}
|
|
48
48
|
|
|
49
|
-
void setEs(const AbstractState&es)
|
|
50
|
-
{
|
|
51
|
-
_es = es;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
AbstractState& getAbsState()
|
|
55
|
-
{
|
|
56
|
-
return _es;
|
|
57
|
-
}
|
|
58
49
|
|
|
59
50
|
void setRelEs(const RelExeState &relEs)
|
|
60
51
|
{
|
|
@@ -66,34 +57,34 @@ public:
|
|
|
66
57
|
return _relEs;
|
|
67
58
|
}
|
|
68
59
|
|
|
69
|
-
void widenAddrs(AbstractState&lhs, const AbstractState&rhs);
|
|
60
|
+
void widenAddrs(AbstractState& es, AbstractState&lhs, const AbstractState&rhs);
|
|
70
61
|
|
|
71
|
-
void narrowAddrs(AbstractState&lhs, const AbstractState&rhs);
|
|
62
|
+
void narrowAddrs(AbstractState& es, AbstractState&lhs, const AbstractState&rhs);
|
|
72
63
|
|
|
73
64
|
/// Return the field address given a pointer points to a struct object and an offset
|
|
74
|
-
AbstractValue getGepObjAddress(u32_t pointer, APOffset offset);
|
|
65
|
+
AbstractValue getGepObjAddress(AbstractState& es, u32_t pointer, APOffset offset);
|
|
75
66
|
|
|
76
67
|
/// Return the value range of Integer SVF Type, e.g. unsigned i8 Type->[0, 255], signed i8 Type->[-128, 127]
|
|
77
68
|
AbstractValue getRangeLimitFromType(const SVFType* type);
|
|
78
69
|
|
|
79
|
-
AbstractValue getZExtValue(const SVFVar* var);
|
|
80
|
-
AbstractValue getSExtValue(const SVFVar* var);
|
|
81
|
-
AbstractValue getFPToSIntValue(const SVFVar* var);
|
|
82
|
-
AbstractValue getFPToUIntValue(const SVFVar* var);
|
|
83
|
-
AbstractValue getSIntToFPValue(const SVFVar* var);
|
|
84
|
-
AbstractValue getUIntToFPValue(const SVFVar* var);
|
|
85
|
-
AbstractValue getTruncValue(const SVFVar* var, const SVFType* dstType);
|
|
86
|
-
AbstractValue getFPTruncValue(const SVFVar* var, const SVFType* dstType);
|
|
70
|
+
AbstractValue getZExtValue(AbstractState& es, const SVFVar* var);
|
|
71
|
+
AbstractValue getSExtValue(AbstractState& es, const SVFVar* var);
|
|
72
|
+
AbstractValue getFPToSIntValue(AbstractState& es, const SVFVar* var);
|
|
73
|
+
AbstractValue getFPToUIntValue(AbstractState& es, const SVFVar* var);
|
|
74
|
+
AbstractValue getSIntToFPValue(AbstractState& es, const SVFVar* var);
|
|
75
|
+
AbstractValue getUIntToFPValue(AbstractState& es, const SVFVar* var);
|
|
76
|
+
AbstractValue getTruncValue(AbstractState& es, const SVFVar* var, const SVFType* dstType);
|
|
77
|
+
AbstractValue getFPTruncValue(AbstractState& es, const SVFVar* var, const SVFType* dstType);
|
|
87
78
|
|
|
88
79
|
/// Return the byte offset expression of a GepStmt
|
|
89
80
|
/// elemBytesize is the element byte size of an static alloc or heap alloc array
|
|
90
81
|
/// e.g. GepStmt* gep = [i32*10], x, and x is [0,3]
|
|
91
82
|
/// std::pair<s32_t, s32_t> byteOffset = getByteOffset(gep);
|
|
92
83
|
/// byteOffset should be [0, 12] since i32 is 4 bytes.
|
|
93
|
-
AbstractValue getByteOffset(const GepStmt *gep);
|
|
84
|
+
AbstractValue getByteOffset(AbstractState& es, const GepStmt *gep);
|
|
94
85
|
|
|
95
86
|
/// Return the offset expression of a GepStmt
|
|
96
|
-
AbstractValue getItvOfFlattenedElemIndex(const GepStmt *gep);
|
|
87
|
+
AbstractValue getItvOfFlattenedElemIndex(AbstractState& es, const GepStmt *gep);
|
|
97
88
|
|
|
98
89
|
|
|
99
90
|
static z3::context &getContext()
|
|
@@ -105,66 +96,66 @@ public:
|
|
|
105
96
|
|
|
106
97
|
|
|
107
98
|
/// Init ObjVar
|
|
108
|
-
void initObjVar(const ObjVar *objVar, u32_t varId);
|
|
99
|
+
void initObjVar(AbstractState& es, const ObjVar *objVar, u32_t varId);
|
|
109
100
|
|
|
110
101
|
/// Init SVFVar
|
|
111
|
-
void initSVFVar(u32_t varId);
|
|
102
|
+
void initSVFVar(AbstractState& es, u32_t varId);
|
|
112
103
|
|
|
113
|
-
inline AbstractValue &getAddrs(u32_t id)
|
|
104
|
+
inline AbstractValue &getAddrs(AbstractState& es, u32_t id)
|
|
114
105
|
{
|
|
115
|
-
if (inVarToAddrsTable(id))
|
|
116
|
-
return
|
|
106
|
+
if (inVarToAddrsTable(es, id))
|
|
107
|
+
return es.getAddrs(id);
|
|
117
108
|
else
|
|
118
109
|
return globalNulladdrs;
|
|
119
110
|
}
|
|
120
111
|
|
|
121
112
|
|
|
122
113
|
/// whether the variable is in varToVal table
|
|
123
|
-
inline bool inVarToValTable(u32_t id) const
|
|
114
|
+
inline bool inVarToValTable(AbstractState& es, u32_t id) const
|
|
124
115
|
{
|
|
125
|
-
return
|
|
116
|
+
return es.inVarToValTable(id);
|
|
126
117
|
}
|
|
127
118
|
|
|
128
119
|
/// whether the variable is in varToAddrs table
|
|
129
|
-
inline bool inVarToAddrsTable(u32_t id) const
|
|
120
|
+
inline bool inVarToAddrsTable(AbstractState& es, u32_t id) const
|
|
130
121
|
{
|
|
131
|
-
return
|
|
122
|
+
return es.inVarToAddrsTable(id);
|
|
132
123
|
}
|
|
133
124
|
|
|
134
125
|
|
|
135
126
|
/// whether the memory address stores a interval value
|
|
136
|
-
inline bool inLocToValTable(u32_t id) const
|
|
127
|
+
inline bool inLocToValTable(AbstractState& es, u32_t id) const
|
|
137
128
|
{
|
|
138
|
-
return
|
|
129
|
+
return es.inLocToValTable(id);
|
|
139
130
|
}
|
|
140
131
|
|
|
141
132
|
/// whether the memory address stores memory addresses
|
|
142
|
-
inline bool inLocToAddrsTable(u32_t id) const
|
|
133
|
+
inline bool inLocToAddrsTable(AbstractState& es, u32_t id) const
|
|
143
134
|
{
|
|
144
|
-
return
|
|
135
|
+
return es.inLocToAddrsTable(id);
|
|
145
136
|
}
|
|
146
137
|
|
|
147
|
-
void handleAddr(const AddrStmt *addr);
|
|
138
|
+
void handleAddr(AbstractState& es, const AddrStmt *addr);
|
|
148
139
|
|
|
149
|
-
void handleBinary(const BinaryOPStmt *binary);
|
|
140
|
+
void handleBinary(AbstractState& es, const BinaryOPStmt *binary);
|
|
150
141
|
|
|
151
|
-
void handleCmp(const CmpStmt *cmp);
|
|
142
|
+
void handleCmp(AbstractState& es, const CmpStmt *cmp);
|
|
152
143
|
|
|
153
|
-
void handleLoad(const LoadStmt *load);
|
|
144
|
+
void handleLoad(AbstractState& es, const LoadStmt *load);
|
|
154
145
|
|
|
155
|
-
void handleStore(const StoreStmt *store);
|
|
146
|
+
void handleStore(AbstractState& es, const StoreStmt *store);
|
|
156
147
|
|
|
157
|
-
void handleCopy(const CopyStmt *copy);
|
|
148
|
+
void handleCopy(AbstractState& es, const CopyStmt *copy);
|
|
158
149
|
|
|
159
|
-
void handleCall(const CallPE *callPE);
|
|
150
|
+
void handleCall(AbstractState& es, const CallPE *callPE);
|
|
160
151
|
|
|
161
|
-
void handleRet(const RetPE *retPE);
|
|
152
|
+
void handleRet(AbstractState& es, const RetPE *retPE);
|
|
162
153
|
|
|
163
|
-
void handleGep(const GepStmt *gep);
|
|
154
|
+
void handleGep(AbstractState& es, const GepStmt *gep);
|
|
164
155
|
|
|
165
|
-
void handleSelect(const SelectStmt *select);
|
|
156
|
+
void handleSelect(AbstractState& es, const SelectStmt *select);
|
|
166
157
|
|
|
167
|
-
void handlePhi(const PhiStmt *phi);
|
|
158
|
+
void handlePhi(AbstractState& es, const PhiStmt *phi);
|
|
168
159
|
|
|
169
160
|
/// Return the internal index if idx is an address otherwise return the value of idx
|
|
170
161
|
static inline u32_t getInternalID(u32_t idx)
|
|
@@ -184,29 +175,8 @@ public:
|
|
|
184
175
|
return AbstractState::isVirtualMemAddress(val);
|
|
185
176
|
}
|
|
186
177
|
|
|
187
|
-
protected:
|
|
188
|
-
|
|
189
|
-
void handleBinaryRel(const BinaryOPStmt *binary);
|
|
190
|
-
|
|
191
|
-
void handleCmpRel(const CmpStmt *cmp);
|
|
192
|
-
|
|
193
|
-
void handleLoadRel(const LoadStmt *load);
|
|
194
|
-
|
|
195
|
-
void handleStoreRel(const StoreStmt *store);
|
|
196
|
-
|
|
197
|
-
void handleCopyRel(const CopyStmt *copy);
|
|
198
|
-
|
|
199
|
-
void handleCallRel(const CallPE *callPE);
|
|
200
|
-
|
|
201
|
-
void handleRetRel(const RetPE *retPE);
|
|
202
|
-
|
|
203
|
-
void handleSelectRel(const SelectStmt *select);
|
|
204
|
-
|
|
205
|
-
void handlePhiRel(const PhiStmt *phi, const ICFGNode *srcNode, const std::vector<const ICFGEdge *> &path);
|
|
206
|
-
|
|
207
178
|
private:
|
|
208
179
|
SVFIR *_svfir;
|
|
209
|
-
AbstractState _es;
|
|
210
180
|
RelExeState _relEs;
|
|
211
181
|
};
|
|
212
182
|
}
|