Predator
[unstable] git snapshot
|
SymHeap - the elementary representation of the state of program memory. More...
#include "config.h"
#include "intrange.hh"
#include "symid.hh"
#include "util.hh"
#include <cl/code_listener.h>
#include <map>
#include <set>
#include <string>
#include <vector>
Go to the source code of this file.
Data Structures | |
union | CustomValueData |
class | CustomValue |
representation of a custom value, such as integer literal, or code pointer More... | |
struct | CVar |
bundles static identification of a variable with its instance number More... | |
struct | CallInst |
bundles static identification of a function with its call instance number More... | |
struct | UniformBlock |
only uninitialized or nullified blocks; generic arrays and strings need more More... | |
class | SymHeapCore |
SymHeapCore - the elementary representation of the state of program memory. More... | |
class | FldHandle |
class | PtrHandle |
class | FldList |
ugly, but typedefs do not support partial declarations More... | |
struct | BindingOff |
tuple of binding offsets assigned to abstract objects More... | |
class | SymHeap |
extension of SymHeapCore dealing with abstract objects (list segments etc.) More... | |
class | ProtectionIntrusion |
temporarily disable protected mode of SymHeap in a debug build More... |
Namespaces | |
namespace | CodeStorage |
object model that describes the analyzed code on the input | |
namespace | Trace |
directed acyclic graph of the symbolic execution trace |
Typedefs | |
typedef IR::TInt | TOffset |
a type used for integral offsets (changing this is known to cause problems) | |
typedef IR::TInt | TSizeOf |
a type used for block sizes (do not set this to anything else than TOffset) | |
typedef IR::Range | TSizeRange |
a type used for block size ranges (do not try to change this one either) | |
typedef std::vector< TOffset > | TOffList |
a container to store offsets to | |
typedef std::vector< TValId > | TValList |
container used to store value IDs to | |
typedef std::vector< TObjId > | TObjList |
container used to store object IDs to | |
typedef std::set< TValId > | TValSet |
container used to store value IDs to | |
typedef std::set< TObjId > | TObjSet |
container used to store object IDs to | |
typedef std::map< TValId, TValId > | TValMap |
a type used for (injective) value IDs mapping | |
typedef std::map< TObjId, TObjId > | TObjMap |
a type used for (injective) object IDs mapping | |
typedef struct cl_type * | TObjType |
a type used for type-info | |
typedef enum cl_type_e | TObjCode |
a class of type (structure, pointer, union, ...) | |
typedef const CodeStorage::Storage & | TStorRef |
a reference to CodeStorage::Storage instance describing the analyzed code | |
typedef short | TProtoLevel |
a type used for prototype level (0 means not a prototype) | |
typedef std::vector< CVar > | TCVarList |
a list of program variables | |
typedef std::set< CVar > | TCVarSet |
a set of program variables | |
typedef std::map< TOffset, UniformBlock > | TUniBlockMap |
a container used to return list of uniform blocks | |
typedef std::set< FldHandle > | TFldSet |
set of object handles | |
typedef short | TMinLen |
a type used for minimal segment length (0+, 1+, ...) |
Enumerations | |
enum | EValueOrigin { VO_INVALID, VO_ASSIGNED, VO_UNKNOWN, VO_REINTERPRET, VO_DEREF_FAILED, VO_STACK, VO_HEAP } |
classification of kind of origins a value may come from More... | |
enum | EValueTarget { VT_INVALID, VT_UNKNOWN, VT_COMPOSITE, VT_CUSTOM, VT_OBJECT, VT_RANGE } |
classification of kind of objects a value may point to More... | |
enum | EStorageClass { SC_INVALID, SC_UNKNOWN, SC_STATIC, SC_ON_HEAP, SC_ON_STACK } |
classification of the storage class for objects More... | |
enum | ETargetSpecifier { TS_INVALID, TS_REGION, TS_FIRST, TS_LAST, TS_ALL } |
classification of the target of an address (a.k.a. target specifier) More... | |
enum | ECustomValue { CV_INVALID, CV_FNC, CV_INT_RANGE, CV_REAL, CV_STRING } |
enumeration of custom values, such as integer literals, or code pointers More... | |
enum | EObjKind { OK_REGION = 0, OK_SLS, OK_DLS, OK_OBJ_OR_NULL, OK_SEE_THROUGH, OK_SEE_THROUGH_2N } |
enumeration of abstract object (although OK_REGION is not abstract) More... |
Functions | |
bool | isUninitialized (EValueOrigin) |
true for VO_HEAP and VO_STACK | |
bool | isAnyDataArea (EValueTarget) |
TODO: drop this! | |
bool | isOnHeap (EStorageClass) |
true for SC_ON_HEAP | |
bool | isProgramVar (EStorageClass) |
true for SC_STATIC and SC_ON_STACK | |
bool | operator== (const CustomValue &a, const CustomValue &b) |
bool | operator!= (const CustomValue &a, const CustomValue &b) |
bool | operator== (const CVar &a, const CVar &b) |
bool | operator!= (const CVar &a, const CVar &b) |
bool | operator== (const CallInst &a, const CallInst &b) |
bool | operator!= (const CallInst &a, const CallInst &b) |
bool | operator< (const CallInst &a, const CallInst &b) |
lexicographical comparison of CallInst objects | |
bool | operator< (const CVar &a, const CVar &b) |
lexicographical comparison of CVar objects | |
bool | operator< (const FldHandle &a, const FldHandle &b) |
this allows to insert FldHandle instances into std::set | |
bool | operator== (const FldHandle &a, const FldHandle &b) |
bool | operator!= (const FldHandle &a, const FldHandle &b) |
bool | isMayExistObj (const enum EObjKind kind) |
bool | operator== (const BindingOff &off1, const BindingOff &off2) |
point-wise comparison of BindingOff | |
bool | operator!= (const BindingOff &off1, const BindingOff &off2) |
point-wise comparison of BindingOff | |
bool | operator< (const BindingOff &off1, const BindingOff &off2) |
lexicographical comparison of BindingOff, need for std::map | |
void | enableProtectedMode (bool enable) |
enable/disable built-in self-checks (takes effect only in debug build) |
SymHeap - the elementary representation of the state of program memory.
Definition in file symheap.hh.
a list of program variables
Definition at line 325 of file symheap.hh.
a set of program variables
Definition at line 328 of file symheap.hh.
set of object handles
Definition at line 753 of file symheap.hh.
typedef short TMinLen |
a type used for minimal segment length (0+, 1+, ...)
Definition at line 756 of file symheap.hh.
a class of type (structure, pointer, union, ...)
Definition at line 228 of file symheap.hh.
container used to store object IDs to
Definition at line 210 of file symheap.hh.
a type used for (injective) object IDs mapping
Definition at line 222 of file symheap.hh.
container used to store object IDs to
Definition at line 216 of file symheap.hh.
a type used for type-info
Definition at line 225 of file symheap.hh.
a container to store offsets to
Definition at line 204 of file symheap.hh.
a type used for integral offsets (changing this is known to cause problems)
Definition at line 195 of file symheap.hh.
typedef short TProtoLevel |
a type used for prototype level (0 means not a prototype)
Definition at line 234 of file symheap.hh.
a type used for block sizes (do not set this to anything else than TOffset)
Definition at line 198 of file symheap.hh.
typedef IR::Range TSizeRange |
a type used for block size ranges (do not try to change this one either)
Definition at line 201 of file symheap.hh.
typedef const CodeStorage::Storage& TStorRef |
a reference to CodeStorage::Storage instance describing the analyzed code
Definition at line 231 of file symheap.hh.
typedef std::map<TOffset, UniformBlock> TUniBlockMap |
a container used to return list of uniform blocks
Definition at line 338 of file symheap.hh.
container used to store value IDs to
Definition at line 207 of file symheap.hh.
a type used for (injective) value IDs mapping
Definition at line 219 of file symheap.hh.
container used to store value IDs to
Definition at line 213 of file symheap.hh.
enum ECustomValue |
enumeration of custom values, such as integer literals, or code pointers
CV_INVALID |
reserved for signalling error states |
CV_FNC |
code pointer |
CV_INT_RANGE |
a closed interval over integral domain |
CV_REAL |
floating-point number |
CV_STRING |
string literal |
Definition at line 98 of file symheap.hh.
enum EObjKind |
enumeration of abstract object (although OK_REGION is not abstract)
Definition at line 759 of file symheap.hh.
enum EStorageClass |
classification of the storage class for objects
Definition at line 74 of file symheap.hh.
enum ETargetSpecifier |
classification of the target of an address (a.k.a. target specifier)
Definition at line 89 of file symheap.hh.
enum EValueOrigin |
classification of kind of origins a value may come from
Definition at line 45 of file symheap.hh.
enum EValueTarget |
classification of kind of objects a value may point to
Definition at line 59 of file symheap.hh.
void enableProtectedMode | ( | bool | enable | ) |
enable/disable built-in self-checks (takes effect only in debug build)
Referenced by ProtectionIntrusion::ProtectionIntrusion(), and ProtectionIntrusion::~ProtectionIntrusion().
bool isAnyDataArea | ( | EValueTarget | ) |
TODO: drop this!
|
inline |
Definition at line 768 of file symheap.hh.
References OK_OBJ_OR_NULL, OK_SEE_THROUGH, and OK_SEE_THROUGH_2N.
bool isOnHeap | ( | EStorageClass | ) |
true for SC_ON_HEAP
bool isProgramVar | ( | EStorageClass | ) |
true for SC_STATIC and SC_ON_STACK
Referenced by gatherProgramVarsCore(), and traverseProgramVarsGeneric().
bool isUninitialized | ( | EValueOrigin | ) |
true for VO_HEAP and VO_STACK
|
inline |
Definition at line 181 of file symheap.hh.
References operator==().
Definition at line 275 of file symheap.hh.
References operator==().
Definition at line 306 of file symheap.hh.
References operator==().
Definition at line 734 of file symheap.hh.
References operator==().
|
inline |
point-wise comparison of BindingOff
Definition at line 813 of file symheap.hh.
References operator==().
lexicographical comparison of CallInst objects
Definition at line 315 of file symheap.hh.
References CallInst::inst, and RETURN_IF_COMPARED.
lexicographical comparison of CVar objects
Definition at line 344 of file symheap.hh.
References CVar::inst, and RETURN_IF_COMPARED.
this allows to insert FldHandle instances into std::set
Definition at line 719 of file symheap.hh.
References FldHandle::fieldId(), RETURN_IF_COMPARED, and SymProc::sh().
|
inline |
lexicographical comparison of BindingOff, need for std::map
Definition at line 819 of file symheap.hh.
References BindingOff::head, and RETURN_IF_COMPARED.
bool operator== | ( | const CustomValue & | a, |
const CustomValue & | b | ||
) |
Definition at line 263 of file symheap.hh.
References CVar::inst, and CVar::uid.
Definition at line 300 of file symheap.hh.
References CallInst::inst, and CallInst::uid.
Definition at line 728 of file symheap.hh.
References FldHandle::fieldId(), and FldHandle::sh().
|
inline |
point-wise comparison of BindingOff
Definition at line 805 of file symheap.hh.
References BindingOff::head, BindingOff::next, and BindingOff::prev.