svf-lib 1.0.2705 → 1.0.2707

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.
Binary file
@@ -147,6 +147,12 @@ public:
147
147
  return addr == BlackHoleObjAddr;
148
148
  }
149
149
 
150
+ /// Whether addr has no concrete backing memory object.
151
+ static inline bool isNullOrBlackHoleAddr(u32_t addr)
152
+ {
153
+ return isNullMem(addr) || isBlackHoleObjAddr(addr);
154
+ }
155
+
150
156
 
151
157
  protected:
152
158
  VarToAbsValMap _varToAbsVal; ///< Map a variable (symbol) to its abstract value
@@ -187,9 +193,8 @@ public:
187
193
  inline void store(u32_t addr, const AbstractValue &val)
188
194
  {
189
195
  assert(isVirtualMemAddress(addr) && "not virtual address?");
190
- u32_t objId = getIDFromAddr(addr);
191
- if (isNullMem(addr)) return;
192
- _addrToAbsVal[objId] = val;
196
+ if (!isNullOrBlackHoleAddr(addr))
197
+ _addrToAbsVal[getIDFromAddr(addr)] = val;
193
198
  }
194
199
 
195
200
  /// whether the variable is in varToAddrs table
@@ -94,6 +94,9 @@ public:
94
94
  /// Check if an interval length is usable (not bottom, not unbounded).
95
95
  static bool isValidLength(const IntervalValue& len);
96
96
 
97
+ /// Return the lower bound of len, capped by the field limit.
98
+ static u32_t getBoundedMinimumByteCount(const IntervalValue& len);
99
+
97
100
  /// Calculate the length of a null-terminated string in abstract state.
98
101
  IntervalValue getStrlen(const ValVar *strValue, const ICFGNode* node);
99
102
 
@@ -282,6 +282,14 @@ private:
282
282
 
283
283
  void updateStateOnBinary(const BinaryOPStmt *binary);
284
284
 
285
+ IntervalValue evaluatePointerCmp(u32_t predicate,
286
+ const AddressValue& lhs,
287
+ const AddressValue& rhs) const;
288
+
289
+ IntervalValue evaluateIntervalCmp(u32_t predicate,
290
+ const IntervalValue& lhs,
291
+ const IntervalValue& rhs) const;
292
+
285
293
  void updateStateOnCmp(const CmpStmt *cmp);
286
294
 
287
295
  void updateStateOnLoad(const LoadStmt *load);
@@ -153,6 +153,11 @@ private:
153
153
  /// and reverseNodeMapping
154
154
  bool metaSame(const PointsTo &pt) const;
155
155
 
156
+ /// Ends the lifetime of the backing this set currently holds, through the
157
+ /// type currently stored in `type`. Callers that then placement new a new
158
+ /// backing must call this first, or whatever the old backing owned is lost.
159
+ void destroyBacking();
160
+
156
161
  private:
157
162
  /// Best node mapping we know of the for the analyses at hand.
158
163
  static MappingPtr currentBestNodeMapping;
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-lib",
3
- "version": "1.0.2705",
3
+ "version": "1.0.2707",
4
4
  "description": "SVF's npm support",
5
5
  "main": "index.js",
6
6
  "scripts": {