diff --git a/svf/lib/MemoryModel/AccessPath.cpp b/svf/lib/MemoryModel/AccessPath.cpp index 99a96a897..ea7e7234f 100644 --- a/svf/lib/MemoryModel/AccessPath.cpp +++ b/svf/lib/MemoryModel/AccessPath.cpp @@ -112,6 +112,9 @@ APOffset AccessPath::computeConstantByteOffset() const /// i = 0, type: [10 x i8]*, PtrType, op = 0 /// i = 1, type: [10 x i8], ArrType, op = 8 const SVFType* type = offsetVarAndGepTypePairs[i].second; + /// if offsetVarAndGepTypePairs[i].second is nullptr, it means + /// this GepStmt comes from external API, assert + assert(type && "this GepStmt comes from ExternalAPI cannot call this api"); const SVFType* type2 = type; if (const SVFArrayType* arrType = SVFUtil::dyn_cast(type)) {