svf-tools 1.0.731 → 1.0.733

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-tools",
3
- "version": "1.0.731",
3
+ "version": "1.0.733",
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": {
@@ -56,7 +56,7 @@ public:
56
56
  CFLGrammar* normalize(GrammarBase *generalGrammar);
57
57
 
58
58
  /// Expand every variable attribute in rawProductions of grammarbase
59
- CFLGrammar* fillAttribute(CFLGrammar *grammar, const Map<CFLGrammar::Kind, Set<CFLGrammar::Attribute>>& kind2AttrsMap);
59
+ CFLGrammar* fillAttribute(CFLGrammar *grammar, const Map<CFLGrammar::Kind, Set<CFLGrammar::Attribute>>& kindToAttrsMap);
60
60
 
61
61
  private:
62
62
  /// Add nonterminal to tranfer long rules to binary rules
@@ -112,8 +112,8 @@ public:
112
112
  {
113
113
  return false;
114
114
  }
115
- CFLGrammar::Kind copyKind = grammar->str2Kind("copy");
116
- CFLGrammar::Kind copybarKind = grammar->str2Kind("copybar");
115
+ CFLGrammar::Kind copyKind = grammar->strToKind("copy");
116
+ CFLGrammar::Kind copybarKind = grammar->strToKind("copybar");
117
117
  solver->pushIntoWorklist(graph->addCFLEdge(graph->getGNode(src),graph->getGNode(dst), copyKind));
118
118
  solver->pushIntoWorklist(graph->addCFLEdge(graph->getGNode(dst),graph->getGNode(src), copybarKind));
119
119
  return true;
@@ -61,6 +61,9 @@ public:
61
61
  delete grammarBase;
62
62
  }
63
63
 
64
+ /// Parameter Checking
65
+ virtual void checkParameter();
66
+
64
67
  /// Build Grammar from text file
65
68
  virtual void buildCFLGrammar();
66
69
 
@@ -42,29 +42,29 @@ public:
42
42
  /// Check all kinds in grammar in graphBuilder with the same label
43
43
  for(auto pairV : grammar->getTerminals())
44
44
  {
45
- if (graphBuilder->getLabel2KindMap().find(pairV.first) != graphBuilder->getLabel2KindMap().end())
45
+ if (graphBuilder->getLabelToKindMap().find(pairV.first) != graphBuilder->getLabelToKindMap().end())
46
46
  {
47
- assert(graphBuilder->getLabel2KindMap()[pairV.first] == pairV.second);
48
- assert(graphBuilder->getKind2LabelMap()[pairV.second] == pairV.first);
47
+ assert(graphBuilder->getLabelToKindMap()[pairV.first] == pairV.second);
48
+ assert(graphBuilder->getKindToLabelMap()[pairV.second] == pairV.first);
49
49
  }
50
50
  }
51
51
 
52
52
  for(auto pairV : grammar->getNonterminals())
53
53
  {
54
- if (graphBuilder->getLabel2KindMap().find(pairV.first) != graphBuilder->getLabel2KindMap().end())
54
+ if (graphBuilder->getLabelToKindMap().find(pairV.first) != graphBuilder->getLabelToKindMap().end())
55
55
  {
56
- assert(graphBuilder->getLabel2KindMap()[pairV.first] == pairV.second);
57
- assert(graphBuilder->getKind2LabelMap()[pairV.second] == pairV.first);
56
+ assert(graphBuilder->getLabelToKindMap()[pairV.first] == pairV.second);
57
+ assert(graphBuilder->getKindToLabelMap()[pairV.second] == pairV.first);
58
58
  }
59
59
  else
60
60
  {
61
- graphBuilder->getLabel2KindMap().insert(std::make_pair (pairV.first,pairV.second));
62
- graphBuilder->getKind2LabelMap().insert(std::make_pair (pairV.second, pairV.first));
61
+ graphBuilder->getLabelToKindMap().insert(std::make_pair (pairV.first,pairV.second));
62
+ graphBuilder->getKindToLabelMap().insert(std::make_pair (pairV.second, pairV.first));
63
63
  }
64
64
  }
65
65
 
66
- /// Get Kind2Attrs Map from Graph to Grammar
67
- grammar->setKind2AttrsMap(graphBuilder->getKind2AttrsMap());
66
+ /// Get KindToAttrs Map from Graph to Grammar
67
+ grammar->setKindToAttrsMap(graphBuilder->getKindToAttrsMap());
68
68
  graph->startKind = grammar->getStartKind();
69
69
  }
70
70
  };
@@ -192,9 +192,9 @@ public:
192
192
  return this->rawProductions;
193
193
  }
194
194
 
195
- inline const Map<Kind, Set<Attribute>>& getKind2AttrsMap() const
195
+ inline const Map<Kind, Set<Attribute>>& getKindToAttrsMap() const
196
196
  {
197
- return this->kind2AttrsMap;
197
+ return this->kindToAttrsMap;
198
198
  }
199
199
 
200
200
  inline Kind getTotalKind()
@@ -223,17 +223,17 @@ public:
223
223
 
224
224
  void setRawProductions(SymbolMap<Symbol, Productions>& rawProductions);
225
225
 
226
- void setKind2AttrsMap(const Map<Kind, Set<Attribute>>& kind2AttrsMap);
226
+ void setKindToAttrsMap(const Map<Kind, Set<Attribute>>& kindToAttrsMap);
227
227
 
228
228
  void setAttributeKinds(const Set<Kind>& attributeKind);
229
229
 
230
- Kind str2Kind(std::string str) const;
230
+ Kind strToKind(std::string str) const;
231
231
 
232
- Symbol str2Symbol(const std::string str) const;
232
+ Symbol strToSymbol(const std::string str) const;
233
233
 
234
- std::string kind2Str(Kind kind) const;
234
+ std::string kindToStr(Kind kind) const;
235
235
 
236
- std::string sym2StrDump(Symbol sym) const;
236
+ std::string symToStrDump(Symbol sym) const;
237
237
 
238
238
  Symbol getSymbol(const Production& prod, u32_t pos)
239
239
  {
@@ -282,7 +282,7 @@ private:
282
282
  Map<std::string, Kind> terminals;
283
283
  Map<std::string, Kind> EBNFSigns; /// Map contains Signs' String and associated Symbols
284
284
  Set<Kind> attributeKinds;
285
- Map<Kind, Set<Attribute>> kind2AttrsMap;
285
+ Map<Kind, Set<Attribute>> kindToAttrsMap;
286
286
  SymbolMap<Symbol, Productions> rawProductions;
287
287
  u32_t totalKind;
288
288
  };
@@ -310,57 +310,57 @@ public:
310
310
  return epsilonProds;
311
311
  }
312
312
 
313
- SymbolMap<Symbol, Productions>& getSingleRHS2Prods()
313
+ SymbolMap<Symbol, Productions>& getSingleRHSToProds()
314
314
  {
315
- return singleRHS2Prods;
315
+ return singleRHSToProds;
316
316
  }
317
317
 
318
- SymbolMap<Symbol, Productions>& getFirstRHS2Prods()
318
+ SymbolMap<Symbol, Productions>& getFirstRHSToProds()
319
319
  {
320
- return firstRHS2Prods;
320
+ return firstRHSToProds;
321
321
  }
322
322
 
323
- SymbolMap<Symbol, Productions>& getSecondRHS2Prods()
323
+ SymbolMap<Symbol, Productions>& getSecondRHSToProds()
324
324
  {
325
- return secondRHS2Prods;
325
+ return secondRHSToProds;
326
326
  }
327
327
 
328
328
  const bool hasProdsFromFirstRHS(const Symbol sym) const
329
329
  {
330
- auto it = firstRHS2Prods.find(sym);
331
- return it!=firstRHS2Prods.end();
330
+ auto it = firstRHSToProds.find(sym);
331
+ return it!=firstRHSToProds.end();
332
332
  }
333
333
 
334
334
  const bool hasProdsFromSingleRHS(const Symbol sym) const
335
335
  {
336
- auto it = singleRHS2Prods.find(sym);
337
- return it!=singleRHS2Prods.end();
336
+ auto it = singleRHSToProds.find(sym);
337
+ return it!=singleRHSToProds.end();
338
338
  }
339
339
 
340
340
  const bool hasProdsFromSecondRHS(const Symbol sym) const
341
341
  {
342
- auto it = secondRHS2Prods.find(sym);
343
- return it!=secondRHS2Prods.end();
342
+ auto it = secondRHSToProds.find(sym);
343
+ return it!=secondRHSToProds.end();
344
344
  }
345
345
 
346
346
  const Productions& getProdsFromSingleRHS(const Symbol sym) const
347
347
  {
348
- auto it = singleRHS2Prods.find(sym);
349
- assert(it!=singleRHS2Prods.end() && "production (X -> sym) not found for sym!!");
348
+ auto it = singleRHSToProds.find(sym);
349
+ assert(it!=singleRHSToProds.end() && "production (X -> sym) not found for sym!!");
350
350
  return it->second;
351
351
  }
352
352
 
353
353
  const Productions& getProdsFromFirstRHS(const Symbol sym) const
354
354
  {
355
- auto it = firstRHS2Prods.find(sym);
356
- assert(it!=firstRHS2Prods.end() && "production (X -> sym Y ) not found for sym!!");
355
+ auto it = firstRHSToProds.find(sym);
356
+ assert(it!=firstRHSToProds.end() && "production (X -> sym Y ) not found for sym!!");
357
357
  return it->second;
358
358
  }
359
359
 
360
360
  const Productions& getProdsFromSecondRHS(const Symbol sym) const
361
361
  {
362
- auto it = secondRHS2Prods.find(sym);
363
- assert(it!=secondRHS2Prods.end() && "production (X -> Y sym) not found for sym!!");
362
+ auto it = secondRHSToProds.find(sym);
363
+ assert(it!=secondRHSToProds.end() && "production (X -> Y sym) not found for sym!!");
364
364
  return it->second;
365
365
  }
366
366
 
@@ -392,9 +392,9 @@ public:
392
392
 
393
393
  private:
394
394
  SymbolSet<Production> epsilonProds;
395
- SymbolMap<Symbol, Productions> singleRHS2Prods;
396
- SymbolMap<Symbol, Productions> firstRHS2Prods;
397
- SymbolMap<Symbol, Productions> secondRHS2Prods;
395
+ SymbolMap<Symbol, Productions> singleRHSToProds;
396
+ SymbolMap<Symbol, Productions> firstRHSToProds;
397
+ SymbolMap<Symbol, Productions> secondRHSToProds;
398
398
  u32_t newTerminalSubscript;
399
399
  };
400
400
 
@@ -37,27 +37,40 @@
37
37
  namespace SVF
38
38
  {
39
39
 
40
- /*!
41
- * Build CFLGraph from memory graph or dot form
42
-
40
+ /**
41
+ * CFLGraphBuilder class is responsible for building CFL (Context-Free Language) graphs
42
+ * from text files or dot files or from memory graph.
43
43
  */
44
-
45
44
  class CFLGraphBuilder
46
45
  {
47
46
  protected:
47
+ /// Define Kind(Not contain attribute) and Symbol(May contain attribute) as types derived from CFLGrammar
48
+ /// to numerically represent label
48
49
  typedef CFLGrammar::Kind Kind;
49
50
  typedef CFLGrammar::Symbol Symbol;
50
- Map<std::string, Kind> label2KindMap;
51
- Map<Kind, std::string> kind2LabelMap;
52
- Map<CFLGrammar::Kind, Set<CFLGrammar::Attribute>> kind2AttrsMap;
53
- bool externMap;
51
+
52
+ /// Maps to maintain mapping between labels and kinds
53
+ Map<std::string, Kind> labelToKindMap;
54
+ Map<Kind, std::string> kindToLabelMap;
55
+
56
+ /// Map to maintain attributes associated with each kind
57
+ Map<CFLGrammar::Kind, Set<CFLGrammar::Attribute>> kindToAttrsMap;
58
+
54
59
  Kind current;
60
+ CFLGraph *cflGraph;
55
61
 
56
- public:
57
- /// add attribute to kind2Attribute Map
62
+ /// Method to add an attribute to a specific kind
58
63
  void addAttribute(CFLGrammar::Kind kind, CFLGrammar::Attribute attribute);
59
64
 
60
- /// Build graph by copying nodes and edges from any graph inherited from GenericGraph
65
+ /// build label and kind connect from the grammar
66
+ void buildlabelToKindMap(GrammarBase *grammar);
67
+
68
+ /// add src and dst node from file
69
+ CFLNode* addGNode(u32_t NodeID);
70
+
71
+ public:
72
+ /// Method to build a CFL graph by copying nodes and edges from any graph
73
+ /// inherited from GenericGraph
61
74
  template<class N, class E>
62
75
  void build(GenericGraph<N,E>* graph, CFLGraph* cflGraph)
63
76
  {
@@ -76,32 +89,32 @@ public:
76
89
  }
77
90
  }
78
91
 
79
- /// Build Bidirectional graph by copying nodes and edges from any graph inherited from GenericGraph
92
+ /// Method to build a bidirectional CFL graph by copying nodes and edges
93
+ /// from any graph inherited from GenericGraph
80
94
  template<class N, class E>
81
95
  CFLGraph* buildBigraph(GenericGraph<N,E>* graph, Kind startKind, GrammarBase *grammar)
82
96
  {
83
97
  CFLGraph *cflGraph = new CFLGraph(startKind);
84
- externMap = true;
85
98
  for(auto pairV : grammar->getTerminals())
86
99
  {
87
- if(label2KindMap.find(pairV.first) == label2KindMap.end())
100
+ if(labelToKindMap.find(pairV.first) == labelToKindMap.end())
88
101
  {
89
- label2KindMap.insert(pairV);
102
+ labelToKindMap.insert(pairV);
90
103
  }
91
- if(kind2LabelMap.find(pairV.second) == kind2LabelMap.end())
104
+ if(kindToLabelMap.find(pairV.second) == kindToLabelMap.end())
92
105
  {
93
- kind2LabelMap.insert(make_pair(pairV.second, pairV.first));
106
+ kindToLabelMap.insert(make_pair(pairV.second, pairV.first));
94
107
  }
95
108
  }
96
109
  for(auto pairV : grammar->getNonterminals())
97
110
  {
98
- if(label2KindMap.find(pairV.first) == label2KindMap.end())
111
+ if(labelToKindMap.find(pairV.first) == labelToKindMap.end())
99
112
  {
100
- label2KindMap.insert(pairV);
113
+ labelToKindMap.insert(pairV);
101
114
  }
102
- if(kind2LabelMap.find(pairV.second) == kind2LabelMap.end())
115
+ if(kindToLabelMap.find(pairV.second) == kindToLabelMap.end())
103
116
  {
104
- kind2LabelMap.insert(make_pair(pairV.second, pairV.first));
117
+ kindToLabelMap.insert(make_pair(pairV.second, pairV.first));
105
118
  }
106
119
  }
107
120
  for(auto it = graph->begin(); it!= graph->end(); it++)
@@ -116,78 +129,89 @@ public:
116
129
  {
117
130
  CFLGrammar::Kind edgeLabel = edge->getEdgeKind();
118
131
  cflGraph->addCFLEdge(cflGraph->getGNode(edge->getSrcID()), cflGraph->getGNode(edge->getDstID()), edgeLabel);
119
- std::string key = kind2LabelMap[edge->getEdgeKind()];
132
+ std::string key = kindToLabelMap[edge->getEdgeKind()];
120
133
  key.append("bar");
121
- cflGraph->addCFLEdge(cflGraph->getGNode(edge->getDstID()), cflGraph->getGNode(edge->getSrcID()), label2KindMap[key]);
134
+ cflGraph->addCFLEdge(cflGraph->getGNode(edge->getDstID()), cflGraph->getGNode(edge->getSrcID()), labelToKindMap[key]);
122
135
  }
123
136
  }
124
137
  return cflGraph;
125
138
  }
126
139
 
127
- /// Build graph from file
128
- void build(std::string filename, CFLGraph* cflGraph);
129
-
130
- /// Build graph from Dot
140
+ /// Method to build a CFL graph from a Dot file
131
141
  CFLGraph *buildFromDot(std::string filename, GrammarBase *grammar);
132
142
 
133
- Map<std::string, Kind>& getLabel2KindMap()
143
+ /// Method to build a CFL graph from a Text file
144
+ CFLGraph* buildFromTextFile(std::string fileName, GrammarBase *grammar);
145
+
146
+ /// @{
147
+ /// Getter methods for accessing class variables
148
+
149
+ /// Returns a reference to the map that associates string labels with their corresponding Kind
150
+ Map<std::string, Kind>& getLabelToKindMap()
134
151
  {
135
- return this->label2KindMap;
152
+ return this->labelToKindMap;
136
153
  }
137
154
 
138
- Map<Kind, std::string>& getKind2LabelMap()
155
+ /// Returns a reference to the map that associates Kinds with their corresponding string labels
156
+ Map<Kind, std::string>& getKindToLabelMap()
139
157
  {
140
- return this->kind2LabelMap;
158
+ return this->kindToLabelMap;
141
159
  }
142
160
 
143
- Map<CFLGrammar::Kind, Set<CFLGrammar::Attribute>>& getKind2AttrsMap()
161
+ /// Returns a reference to the map that associates Kinds with their corresponding attributes
162
+ Map<CFLGrammar::Kind, Set<CFLGrammar::Attribute>>& getKindToAttrsMap()
144
163
  {
145
- return this->kind2AttrsMap;
164
+ return this->kindToAttrsMap;
146
165
  }
147
166
 
148
-
167
+ /// @}
149
168
  };
150
169
 
170
+ /// AliasCFLGraphBuilder: a CFLGraphBuilder specialized for handling aliasing
151
171
  class AliasCFLGraphBuilder : public CFLGraphBuilder
152
172
  {
153
173
  public:
154
- /// Build Bidirectional graph by copying nodes and edges from const graph inherited from GenericGraph
174
+ /// Builds a bidirectional CFL graph by copying nodes and edges from a const graph that inherits from GenericGraph
155
175
  CFLGraph* buildBigraph(ConstraintGraph *graph, Kind startKind, GrammarBase *grammar);
156
176
 
157
- /// Build Bidirectional graph by copying nodes and edges from any graph inherited from GenericGraph
158
- /// And transfer Load Store to copy edge and address edge to construct PEG style CFG
177
+ /// Builds a bidirectional CFL graph by copying nodes and edges from any graph that inherits from GenericGraph
178
+ /// Transfers Load and Store to copy edge and address edge to construct PEG style CFLGraph
159
179
  CFLGraph* buildBiPEGgraph(ConstraintGraph *graph, Kind startKind, GrammarBase *grammar, SVFIR* pag);
160
180
 
161
181
  private:
182
+ /// Connects VGep (Variable GEP)
162
183
  void connectVGep(CFLGraph *cflGraph, ConstraintGraph *graph, ConstraintNode *src, ConstraintNode *dst, u32_t level, SVFIR* pag);
163
184
 
164
- /// Handle edge except for the GEP
185
+ /// Handles edges, with the exception of the GEP
165
186
  void addBiCFLEdge(CFLGraph *cflGraph, ConstraintNode* src, ConstraintNode* dst, CFLGrammar::Kind label);
166
187
 
167
- /// Add Bidirectional GEP edge with attribute
188
+ /// Adds bidirectional GEP edges with attributes
168
189
  void addBiGepCFLEdge(CFLGraph *cflGraph, ConstraintNode* src, ConstraintNode* dst, CFLGrammar::Attribute attri);
169
190
  };
170
191
 
192
+ /// VFCFLGraphBuilder: a CFLGraphBuilder specialized for handling value-flow
171
193
  class VFCFLGraphBuilder : public CFLGraphBuilder
172
194
  {
173
195
  public:
174
- /// Build Bidirectional graph by copying nodes and edges from const graph inherited from GenericGraph
196
+ /// Builds a bidirectional CFL graph by copying nodes and edges from a const graph that inherits from SVFG
175
197
  CFLGraph* buildBigraph(SVFG *graph, Kind startKind, GrammarBase *grammar);
176
198
 
177
- /// Build Bidirectional graph by copying nodes and edges from any graph inherited from GenericGraph
178
- /// And transfer Load Store to copy edge and address edge to construct PEG style CFG
199
+ /// Builds a bidirectional CFL graph by copying nodes and edges from any graph that inherits from GenericGraph
200
+ /// Transfers Load and Store to copy edge and address edge to construct PEG style CFLGraph
179
201
  CFLGraph* buildBiPEGgraph(ConstraintGraph *graph, Kind startKind, GrammarBase *grammar, SVFIR* pag);
180
202
 
181
203
  private:
204
+ /// Connects VGep (Variable GEP)
182
205
  void connectVGep(CFLGraph *cflGraph, ConstraintGraph *graph, ConstraintNode *src, ConstraintNode *dst, u32_t level, SVFIR* pag);
183
206
 
184
- /// Handle edge except for the GEP
207
+ /// Handles edges, with the exception of the GEP
185
208
  void addBiCFLEdge(CFLGraph *cflGraph, ConstraintNode* src, ConstraintNode* dst, CFLGrammar::Kind label);
186
209
 
187
- /// Add Bidirectional GEP edge with attribute
210
+ /// Adds bidirectional GEP edges with attributes
188
211
  void addBiGepCFLEdge(CFLGraph *cflGraph, ConstraintNode* src, ConstraintNode* dst, CFLGrammar::Attribute attri);
189
212
  };
190
213
 
214
+
191
215
  }// SVF
192
216
 
193
217
  #endif /* INCLUDE_CFL_CFLGRAPHBUILDER_H_*/
@@ -46,6 +46,9 @@ public:
46
46
  {
47
47
  }
48
48
 
49
+ /// Parameter Checking
50
+ virtual void checkParameter();
51
+
49
52
  /// Initialize the grammar, graph, solver
50
53
  virtual void initialize();
51
54
 
@@ -481,7 +481,7 @@ public:
481
481
 
482
482
  // Get all operations of an extern function
483
483
  Operand getBasicOperation(cJSON* obj);
484
- ExtFunctionOps getExtFunctionOps(std::string funName);
484
+ ExtFunctionOps getExtFunctionOps(const SVFFunction* extFunction);
485
485
 
486
486
  // Get property of the operation, e.g. "EFT_A1R_A0R"
487
487
  extType get_type(const SVF::SVFFunction *callee);
@@ -1401,7 +1401,7 @@
1401
1401
  },
1402
1402
  "llvm.va_start": {
1403
1403
  "return": "void",
1404
- "arguments": "(ptr)",
1404
+ "arguments": "(i8*)",
1405
1405
  "type": "EFT_NOOP",
1406
1406
  "overwrite_app_function": 1
1407
1407
  },
@@ -3346,8 +3346,8 @@
3346
3346
  }
3347
3347
  },
3348
3348
  "__sysv_signal": {
3349
- "return": "__sighandler_t",
3350
- "arguments": "(int, __sighandler_t)",
3349
+ "return": "void (i32)*",
3350
+ "arguments": "(i32, void (i32)*)",
3351
3351
  "type": "EFT_ALLOC",
3352
3352
  "overwrite_app_function": 1,
3353
3353
  "AddrStmt": {
@@ -3356,8 +3356,8 @@
3356
3356
  }
3357
3357
  },
3358
3358
  "signal": {
3359
- "return": "sighandler_t",
3360
- "arguments": "(int, sighandler_t)",
3359
+ "return": "void (i32)*",
3360
+ "arguments": "(i32, void (i32)*)",
3361
3361
  "type": "EFT_ALLOC",
3362
3362
  "overwrite_app_function": 1,
3363
3363
  "AddrStmt": {
@@ -5009,7 +5009,7 @@
5009
5009
  },
5010
5010
  "llvm.memset.p0i8.i64": {
5011
5011
  "return": "void",
5012
- "arguments": "(i8*, i8, i64, i32, i1)",
5012
+ "arguments": "(i8*, i8, i64, i1)",
5013
5013
  "type": "EFT_L_A0__A0R_A1",
5014
5014
  "overwrite_app_function": 0,
5015
5015
  "memset_like": {
@@ -5061,7 +5061,7 @@
5061
5061
  },
5062
5062
  "llvm.memcpy.p0i8.p0i8.i64": {
5063
5063
  "return": "void",
5064
- "arguments": "(i8*, *i8, i64, i32, i1)",
5064
+ "arguments": "(i8*, i8*, i64, i1)",
5065
5065
  "type": "EFT_L_A0__A0R_A1R",
5066
5066
  "overwrite_app_function": 0,
5067
5067
  "memcpy_like": {
@@ -5585,7 +5585,7 @@
5585
5585
  },
5586
5586
  "_ZNSt8__detail15_List_node_base7_M_hookEPS0_":{
5587
5587
  "return": "void",
5588
- "arguments": "(std::__detail::_List_node_base*)",
5588
+ "arguments": "(struct.std::__detail::_List_node_base*, struct.std::__detail::_List_node_base*)",
5589
5589
  "type": "EFT_STD_LIST_HOOK",
5590
5590
  "overwrite_app_function": 0,
5591
5591
  "StoreStmt": {
@@ -266,6 +266,7 @@ public:
266
266
  static const Option<bool> CFLSVFG;
267
267
  static const Option<bool> POCRAlias;
268
268
  static const Option<bool> POCRHybrid;
269
+ static const Option<bool> Customized;
269
270
 
270
271
  // Loop Analysis
271
272
  static const Option<bool> LoopAnalysis;
@@ -215,17 +215,24 @@ inline CallSite getSVFCallSite(const SVFValue* value)
215
215
  }
216
216
 
217
217
  /// Split into two substrings around the first occurrence of a separator string.
218
- inline std::vector<std::string> split(const std::string& s, char seperator)
218
+ inline std::vector<std::string> split(const std::string& s, char separator)
219
219
  {
220
220
  std::vector<std::string> output;
221
221
  std::string::size_type prev_pos = 0, pos = 0;
222
- while((pos = s.find(seperator, pos)) != std::string::npos)
222
+ while ((pos = s.find(separator, pos)) != std::string::npos)
223
223
  {
224
- std::string substring( s.substr(prev_pos, pos-prev_pos) );
225
- output.push_back(substring);
224
+ std::string substring(s.substr(prev_pos, pos - prev_pos));
225
+ if (!substring.empty())
226
+ {
227
+ output.push_back(substring);
228
+ }
226
229
  prev_pos = ++pos;
227
230
  }
228
- output.push_back(s.substr(prev_pos, pos-prev_pos));
231
+ std::string lastSubstring(s.substr(prev_pos, pos - prev_pos));
232
+ if (!lastSubstring.empty())
233
+ {
234
+ output.push_back(lastSubstring);
235
+ }
229
236
  return output;
230
237
  }
231
238