|
Static Value-Flow Analysis
|
Classes | |
| class | CXXABI |
| struct | DemangledName |
| class | ItaniumABI |
| class | MSVCABI |
| bool SVF::cppUtil::classTyHasVTable | ( | const StructType * | ty | ) |
Definition at line 581 of file CppUtil.cpp.
Definition at line 946 of file CppUtil.cpp.
| struct cppUtil::DemangledName SVF::cppUtil::demangle | ( | const std::string & | name | ) |
Definition at line 195 of file CppUtil.cpp.
extract class name from cpp dyncast function
extract class name from cpp dyncast function
| callBase |
Definition at line 930 of file CppUtil.cpp.
extract class name from the c++ function name, e.g., constructor/destructors
extract class name from the c++ function name, e.g., constructor/destructors
| foo |
Definition at line 718 of file CppUtil.cpp.
extract class names from template functions
extract class names from template functions
| oname |
Definition at line 832 of file CppUtil.cpp.
| std::string SVF::cppUtil::getBeforeBrackets | ( | const std::string & | name | ) |
get class name before brackets e.g., for ‘namespace::A<...::...>::f’, we get ‘namespace::A’
Definition at line 127 of file CppUtil.cpp.
| std::string SVF::cppUtil::getClassNameFromType | ( | const StructType * | ty | ) |
Definition at line 595 of file CppUtil.cpp.
| std::string SVF::cppUtil::getClassNameFromVtblObj | ( | const std::string & | vtblName | ) |
Definition at line 256 of file CppUtil.cpp.
Definition at line 613 of file CppUtil.cpp.
Definition at line 202 of file CppUtil.cpp.
Definition at line 465 of file CppUtil.cpp.
| CXXABI * SVF::cppUtil::getCXXABI | ( | ) |
Definition at line 994 of file CppUtil.cpp.
Definition at line 958 of file CppUtil.cpp.
Definition at line 974 of file CppUtil.cpp.
Definition at line 326 of file CppUtil.cpp.
Definition at line 658 of file CppUtil.cpp.
Definition at line 348 of file CppUtil.cpp.
Definition at line 549 of file CppUtil.cpp.
| const ConstantStruct * SVF::cppUtil::getVtblStruct | ( | const GlobalValue * | vtbl | ) |
Definition at line 261 of file CppUtil.cpp.
class sources can be heap allocation or functions where we can extract the class name (constructors/destructors or template functions)
class sources are functions where we can extract the class name (constructors/destructors or template functions)
| val |
Definition at line 872 of file CppUtil.cpp.
TODO: on mac os function name is an empty string after demangling
Definition at line 501 of file CppUtil.cpp.
Definition at line 320 of file CppUtil.cpp.
Definition at line 521 of file CppUtil.cpp.
whether foo is a cpp dyncast function
whether foo is a cpp dyncast function
| foo |
Definition at line 920 of file CppUtil.cpp.
Given an inheritance relation B is a child of A We assume B::B(thisPtr1){ A::A(thisPtr2) } such that thisPtr1 == thisPtr2
=== Typed pointer mode === this.addr = alloca class.B1* store class.B1* this, class.B1** this.addr this1 = load class.B1*, class.B1** this.addr %0 = bitcast class.B1* this1 to class.A* call void @AA()(class.A* %0)
=== Opaque pointer mode ===
Case 1: Primary base class (offset 0) at O1+ call ptr @Base::Base(ptr this) → thisPtr2 == thisPtr1, return true
Case 2: Primary base class (offset 0) at O0 this.addr = alloca ptr store ptr this, ptr this.addr this1 = load ptr, ptr this.addr call void @Base::Base(ptr this1) → thisPtr2 is LoadInst from alloca storing thisPtr1, return true
Case 3: Non-primary base class (multiple inheritance, offset > 0) %0 = getelementptr inbounds i8, ptr this1, i64 4 call void @Base2Base2(ptr %0) → i8 GEP from this, return true
Case 4: Member field initialization (NOT base class) mem = getelementptr inbounds struct.Derived, ptr this1, i32 0, i32 1 call void @MemberMember(ptr mem) → struct GEP from this, return false
Definition at line 421 of file CppUtil.cpp.
whether foo is a cpp template function
whether foo is a cpp template function TODO: we only consider limited label for now (see the very beginning of CppUtil.cpp)
| foo |
Definition at line 905 of file CppUtil.cpp.
Definition at line 274 of file CppUtil.cpp.
Definition at line 289 of file CppUtil.cpp.
whether foo matches the mangler label
whether fooName matches the mangler label
| foo | |
| label |
Definition at line 894 of file CppUtil.cpp.
Definition at line 565 of file CppUtil.cpp.