svf-lib 1.0.1135 → 1.0.1138

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.
@@ -40,13 +40,13 @@
40
40
  namespace SVF
41
41
  {
42
42
 
43
- class CFLAlias : public PointerAnalysis
43
+ class CFLAlias : public BVDataPTAImpl
44
44
  {
45
45
 
46
46
  public:
47
47
  typedef OrderedMap<CallSite, NodeID> CallSite2DummyValPN;
48
48
 
49
- CFLAlias(SVFIR* ir) : PointerAnalysis(ir, PointerAnalysis::CFLFICI_WPA), svfir(ir), graph(nullptr), grammar(nullptr), solver(nullptr)
49
+ CFLAlias(SVFIR* ir) : BVDataPTAImpl(ir, PointerAnalysis::CFLFICI_WPA), svfir(ir), graph(nullptr), grammar(nullptr), solver(nullptr)
50
50
  {
51
51
  }
52
52
 
@@ -77,10 +77,9 @@ public:
77
77
  }
78
78
 
79
79
  /// Get points-to targets of a pointer. V In this context
80
- virtual const PointsTo& getPts(NodeID ptr)
80
+ virtual const PointsTo& getCFLPts(NodeID ptr)
81
81
  {
82
82
  /// Check V Dst of ptr.
83
- PointsTo *ps = new PointsTo();
84
83
  CFLNode *funNode = graph->getGNode(ptr);
85
84
  for(auto outedge = funNode->getOutEdges().begin(); outedge!=funNode->getOutEdges().end(); outedge++)
86
85
  {
@@ -88,19 +87,22 @@ public:
88
87
  {
89
88
  // Need to Find dst addr src
90
89
  CFLNode *vNode = graph->getGNode((*outedge)->getDstID());
91
-
90
+ addPts(ptr, svfir->getBaseValVar((*outedge)->getDstID()));
92
91
  for(auto inEdge = vNode->getInEdges().begin(); inEdge!=vNode->getInEdges().end(); inEdge++)
93
92
  {
94
93
  if((*inEdge)->getEdgeKind() == 0)
95
94
  {
96
- ps->set((*inEdge)->getSrcID());
95
+ addPts(ptr, (*inEdge)->getSrcID());
97
96
  }
98
97
  }
99
98
  }
100
99
  }
101
- return *ps;
100
+ return getPts(ptr);
102
101
  }
103
102
 
103
+ /// Need Original one for virtual table
104
+
105
+
104
106
  /// Add copy edge on constraint graph
105
107
  virtual inline bool addCopyEdge(NodeID src, NodeID dst)
106
108
  {
@@ -1,5 +1,5 @@
1
1
  Start:
2
- V
2
+ V
3
3
  Terminal:
4
4
  Addr Copy Store Load Gep Vgep
5
5
  Productions:
@@ -19,8 +19,14 @@ Productions:
19
19
  V -> Gepbarpath V Gep_0;
20
20
  V -> Gepbar_i F Gep_i;
21
21
  V -> Gepbar_i Fbar Gep_i;
22
- Gep_j -> Gep_i F Vgep;
23
- Gepbar_j -> Vgepbar Fbar Gepbar_i;
22
+ Copy -> Vgep;
23
+ Copybar -> Vgepbar;
24
+ Gep_1 -> Gep_0 F Gep_1;
25
+ Gepbar_1 -> Gepbar_1 Fbar Gepbar_0;
26
+ Gep_1 -> Gep_0 F Vgep;
27
+ Gepbar_1 -> Vgepbar Fbar Gepbar_0;
28
+ Gepbarpath -> Gepbar_0 Gepbar_0;
29
+ Gepbarpath -> Gepbarpath Gepbar_0;
24
30
  Memflow -> Load Store;
25
31
  Memflow -> Fbar Memflow;
26
32
  Memflow -> F Memflow Fbar;
@@ -30,9 +36,4 @@ Productions:
30
36
  Memflowbar -> Memflowbar F;
31
37
  Memflowbar -> F Memflowbar Fbar;
32
38
  Memflowbar -> Gep_i Memflowbar Gepbar_i;
33
- Memflowbar -> Gepbar_i Memflowbar Gep_i;
34
- Gepbarpath -> Gepbar_i Gepbar_j;
35
- Gepbarpath -> Gepbarpath Gepbar_i;
36
-
37
-
38
-
39
+ Memflowbar -> Gepbar_i Memflowbar Gep_i;
@@ -109,6 +109,7 @@ public:
109
109
  EXT_COPY, // Handle copy edge
110
110
  EXT_LOAD, // Handle load edge
111
111
  EXT_STORE, // Handle store edge
112
+ EXT_GEPGEP, // Handle Gep and Gep edges, and add a dummy node
112
113
  EXT_LOADSTORE, // Handle load and store edges, and add a dummy node
113
114
  EXT_COPY_N, // Copy the character c (an unsigned char) to the first n characters of the string pointed to, by the argument str
114
115
  EXT_COPY_MN, // Copies n characters from memory area src to memory area dest.
@@ -170,6 +171,7 @@ private:
170
171
  {"copy", EXT_COPY},
171
172
  {"load", EXT_LOAD},
172
173
  {"store", EXT_STORE},
174
+ {"gep_gep", EXT_GEPGEP},
173
175
  {"load_store", EXT_LOADSTORE},
174
176
  {"copy_n", EXT_COPY_N},
175
177
  {"copy_mn", EXT_COPY_MN},
@@ -3270,5 +3270,10 @@
3270
3270
  "type": "CPP_EFT_DYNAMIC_CAST",
3271
3271
  "overwrite_app_function": 0,
3272
3272
  "copy": ["A0", "L"]
3273
+ },
3274
+ "_ZNSt5arrayIPK1ALm2EE4backEv":{
3275
+ "type": "CPP_EFT_DYNAMIC_CAST",
3276
+ "overwrite_app_function": 1,
3277
+ "gep_gep": ["A0", "0", "V", "0", "L"]
3273
3278
  }
3274
3279
  }
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-lib",
3
- "version": "1.0.1135",
3
+ "version": "1.0.1138",
4
4
  "description": "SVF's npm support",
5
5
  "main": "index.js",
6
6
  "scripts": {