svf-lib 1.0.2708 → 1.0.2710

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.
@@ -43,6 +43,8 @@
43
43
  #include "Util/GeneralType.h"
44
44
  #include "Util/Options.h"
45
45
 
46
+ #include <optional>
47
+
46
48
  namespace SVF
47
49
  {
48
50
 
@@ -357,9 +359,9 @@ protected:
357
359
  /// SCC detection
358
360
  virtual NodeStack& SCCDetect();
359
361
 
360
- /// Collect may-alias candidates. Attempts to do so from reverse points-to sets (cheaper),
361
- /// and if not possible, falls back to trying every node (costlier).
362
- NodeBS getMayAliasCandidates(NodeID node);
362
+ /// Answer a may-alias query from the reverse points-to sets. Returns nullopt
363
+ /// when those sets cannot answer it, leaving the caller to try every node.
364
+ std::optional<NodeBS> collectMayAliasesFromIndex(const PointsTo& expandedPts);
363
365
 
364
366
  /// Also check getMayAliases on the pointers that the alias tests use
365
367
  virtual void validateSuccessTests(std::string fun);
package/SVF-osx/bin/ae CHANGED
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);
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-lib",
3
- "version": "1.0.2708",
3
+ "version": "1.0.2710",
4
4
  "description": "SVF's npm support",
5
5
  "main": "index.js",
6
6
  "scripts": {