svf-lib 1.0.1607 → 1.0.1609

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.
@@ -171,9 +171,10 @@ public:
171
171
  static inline GEdgeFlag makeEdgeFlagWithAddionalOpnd(GEdgeKind k,
172
172
  const SVFVar* var)
173
173
  {
174
- Var2LabelMap::const_iterator iter = var2LabelMap.find(var);
175
- u64_t label = (iter != var2LabelMap.end()) ? iter->second
176
- : multiOpndLabelCounter++;
174
+ auto it_inserted = var2LabelMap.emplace(var, multiOpndLabelCounter);
175
+ if (it_inserted.second)
176
+ ++multiOpndLabelCounter;
177
+ u64_t label = it_inserted.first->second;
177
178
  return (label << EdgeKindMaskBits) | k;
178
179
  }
179
180
 
@@ -182,9 +183,10 @@ public:
182
183
  static inline GEdgeFlag makeEdgeFlagWithCallInst(GEdgeKind k,
183
184
  const ICFGNode* cs)
184
185
  {
185
- Inst2LabelMap::const_iterator iter = inst2LabelMap.find(cs);
186
- u64_t label = (iter != inst2LabelMap.end()) ? iter->second
187
- : callEdgeLabelCounter++;
186
+ auto it_inserted = inst2LabelMap.emplace(cs, callEdgeLabelCounter);
187
+ if (it_inserted.second)
188
+ ++callEdgeLabelCounter;
189
+ u64_t label = it_inserted.first->second;
188
190
  return (label << EdgeKindMaskBits) | k;
189
191
  }
190
192
 
@@ -193,9 +195,10 @@ public:
193
195
  static inline GEdgeFlag makeEdgeFlagWithStoreInst(GEdgeKind k,
194
196
  const ICFGNode* store)
195
197
  {
196
- Inst2LabelMap::const_iterator iter = inst2LabelMap.find(store);
197
- u64_t label = (iter != inst2LabelMap.end()) ? iter->second
198
- : storeEdgeLabelCounter++;
198
+ auto it_inserted = inst2LabelMap.emplace(store, storeEdgeLabelCounter);
199
+ if (it_inserted.second)
200
+ ++storeEdgeLabelCounter;
201
+ u64_t label = it_inserted.first->second;
199
202
  return (label << EdgeKindMaskBits) | k;
200
203
  }
201
204
 
@@ -373,6 +373,18 @@ public:
373
373
  bugSet.insert(newBug);
374
374
  break;
375
375
  }
376
+ case GenericBug::FULLNULLPTRDEREFERENCE:
377
+ {
378
+ newBug = new FullNullPtrDereferenceBug(eventStack);
379
+ bugSet.insert(newBug);
380
+ break;
381
+ }
382
+ case GenericBug::PARTIALNULLPTRDEREFERENCE:
383
+ {
384
+ newBug = new PartialNullPtrDereferenceBug(eventStack);
385
+ bugSet.insert(newBug);
386
+ break;
387
+ }
376
388
  default:
377
389
  {
378
390
  assert(false && "Abstract Execution does NOT hava his bug type!");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-lib",
3
- "version": "1.0.1607",
3
+ "version": "1.0.1609",
4
4
  "description": "SVF's npm support",
5
5
  "main": "index.js",
6
6
  "scripts": {