Module AliasAnalysis

Import path

semmle.code.cpp.ir.implementation.aliased_ssa.internal.AliasAnalysis

Imports

cpp

Provides classes and predicates for working with C/C++/ObjC/ObjC++ code.

Predicates

bitsToBytesAndBits

Converts the bit count in bits to a byte count and a bit count in the form bytes:bits.

getBitOffsetString

Gets a printable string for a bit offset with possibly unknown value.

getConstantValue

If the result of instruction instr is an integer constant, returns the value of that constant. Otherwise, returns unknown.

getPointerBitOffset

Computes the offset, in bits, by which the result of instr differs from the pointer argument to instr, if that offset is a constant. Otherwise, returns unknown.

operandEscapes

Holds if any address held in operand number tag of instruction instr escapes outside the domain of the analysis.

operandIsConsumedWithoutEscaping

Holds if the operand tag of instruction instr is used in a way that does not result in any address held in that operand from escaping beyond the instruction.

operandIsPropagated

Holds if any address held in operand tag of instruction instr is propagated to the result of instr, offset by the number of bits in bitOffset. If the address is propagated, but the offset is not known to be a constant, then bitOffset is unknown.

resultEscapes

Holds if any address held in the result of instruction instr escapes outside the domain of the analysis.

resultPointsTo

Holds if the result of instruction instr points within variable var, at bit offset bitOffset within the variable. If the result points within var, but at an unknown or non-constant offset, then bitOffset is unknown.

variableAddressEscapes

Holds if the address of the specified variable escapes the domain of the analysis.