|
Static Value-Flow Analysis
|
Namespaces | |
| namespace | ctir |
Classes | |
| struct | DemangledName |
| bool SVF::cppUtil::classTyHasVTable | ( | const StructType * | ty | ) |
Definition at line 640 of file CppUtil.cpp.
Definition at line 1005 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 989 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 777 of file CppUtil.cpp.
extract class names from template functions
extract class names from template functions
| oname |
Definition at line 891 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 654 of file CppUtil.cpp.
| std::string SVF::cppUtil::getClassNameFromVtblObj | ( | const std::string & | vtblName | ) |
Definition at line 304 of file CppUtil.cpp.
Definition at line 672 of file CppUtil.cpp.
Definition at line 242 of file CppUtil.cpp.
Definition at line 528 of file CppUtil.cpp.
Definition at line 389 of file CppUtil.cpp.
Definition at line 717 of file CppUtil.cpp.
Definition at line 411 of file CppUtil.cpp.
Definition at line 608 of file CppUtil.cpp.
| const ConstantStruct * SVF::cppUtil::getVtblStruct | ( | const GlobalValue * | vtbl | ) |
Definition at line 323 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 931 of file CppUtil.cpp.
TODO: on mac os function name is an empty string after demangling
Definition at line 560 of file CppUtil.cpp.
Definition at line 383 of file CppUtil.cpp.
Definition at line 580 of file CppUtil.cpp.
whether foo is a cpp dyncast function
whether foo is a cpp dyncast function
| foo |
Definition at line 979 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 484 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 964 of file CppUtil.cpp.
Definition at line 336 of file CppUtil.cpp.
Definition at line 352 of file CppUtil.cpp.
whether foo matches the mangler label
whether fooName matches the mangler label
| foo | |
| label |
Definition at line 953 of file CppUtil.cpp.
Definition at line 624 of file CppUtil.cpp.