svf-tools 1.0.720 → 1.0.721

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.720",
3
+ "version": "1.0.721",
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": {
@@ -1057,8 +1057,9 @@ StInfo* LLVMModuleSet::collectArrayInfo(const ArrayType* ty)
1057
1057
  /// Array's flatten field infor is the same as its element's
1058
1058
  /// flatten infor.
1059
1059
  StInfo* elemStInfo = collectTypeInfo(elemTy);
1060
- u32_t nfE = elemStInfo->getNumOfFlattenFields();
1061
- for (u32_t j = 0; j < nfE; j++)
1060
+ u32_t nfF = elemStInfo->getNumOfFlattenFields();
1061
+ u32_t nfE = elemStInfo->getNumOfFlattenElements();
1062
+ for (u32_t j = 0; j < nfF; j++)
1062
1063
  {
1063
1064
  const SVFType* fieldTy = elemStInfo->getFlattenFieldTypes()[j];
1064
1065
  stInfo->getFlattenFieldTypes().push_back(fieldTy);
@@ -1077,14 +1078,14 @@ StInfo* LLVMModuleSet::collectArrayInfo(const ArrayType* ty)
1077
1078
  {
1078
1079
  for (u32_t j = 0; j < nfE; ++j)
1079
1080
  {
1080
- const SVFType* et = elemStInfo->getFlattenFieldTypes()[j];
1081
+ const SVFType* et = elemStInfo->getFlattenElementTypes()[j];
1081
1082
  stInfo->getFlattenElementTypes().push_back(et);
1082
1083
  }
1083
1084
  }
1084
1085
 
1085
1086
  assert(stInfo->getFlattenElementTypes().size() == nfE * totalElemNum &&
1086
1087
  "typeForArray size incorrect!!!");
1087
- stInfo->setNumOfFieldsAndElems(nfE, nfE * totalElemNum);
1088
+ stInfo->setNumOfFieldsAndElems(nfF, nfE * totalElemNum);
1088
1089
 
1089
1090
  return stInfo;
1090
1091
  }
@@ -1112,23 +1113,22 @@ StInfo* LLVMModuleSet::collectStructInfo(const StructType* structTy,
1112
1113
  if (SVFUtil::isa<StructType, ArrayType>(elemTy))
1113
1114
  {
1114
1115
  StInfo* subStInfo = collectTypeInfo(elemTy);
1115
- u32_t nfE = subStInfo->getNumOfFlattenFields();
1116
+ u32_t nfF = subStInfo->getNumOfFlattenFields();
1117
+ u32_t nfE = subStInfo->getNumOfFlattenElements();
1116
1118
  // Copy ST's info, whose element 0 is the size of ST itself.
1117
- for (u32_t j = 0; j < nfE; ++j)
1119
+ for (u32_t j = 0; j < nfF; ++j)
1118
1120
  {
1119
1121
  const SVFType* elemTy = subStInfo->getFlattenFieldTypes()[j];
1120
1122
  stInfo->getFlattenFieldTypes().push_back(elemTy);
1121
1123
  }
1122
- numFields += nfE;
1123
- strideOffset += nfE * subStInfo->getStride();
1124
- for (u32_t tpi = 0; tpi < subStInfo->getStride(); ++tpi)
1124
+ numFields += nfF;
1125
+ strideOffset += nfE;
1126
+ for (u32_t tpj = 0; tpj < nfE; ++tpj)
1125
1127
  {
1126
- for (u32_t tpj = 0; tpj < nfE; ++tpj)
1127
- {
1128
- const SVFType* ty = subStInfo->getFlattenFieldTypes()[tpj];
1129
- stInfo->getFlattenElementTypes().push_back(ty);
1130
- }
1128
+ const SVFType* ty = subStInfo->getFlattenElementTypes()[tpj];
1129
+ stInfo->getFlattenElementTypes().push_back(ty);
1131
1130
  }
1131
+
1132
1132
  }
1133
1133
  else
1134
1134
  {