Expand description
For an introduction to the crate and how to get started, see the crate’s README.
Re-exports§
pub use config::Config;
Modules§
- alloc_
utils - Utility functions for performing memory allocation. These may be useful in implementing hooks for various functions that perform memory allocation.
- backend
- Traits which abstract over the backend (BV types, memory implementation, etc) being used.
- callbacks
- Functions and structures for defining and activating instruction callbacks
- cell_
memory - Implementation of a
Memorybased on a Boolector array and 64-bit cells. Handles fully general read and write operations: arbitrary addresses, sizes, and alignments. - config
- The
Configstructure for configuringhaybale, and other associated definitions - function_
hooks - Functions and structures for defining and activating function hooks
- hook_
utils - Utility functions for performing memset or memcpy operations. These may be useful in implementing hooks for other functions.
- simple_
memory - Simple implementation of a
Memorybased on a Boolector array and 8-bit cells. Like the more complicatedMemoryincell_memory.rs, this handles fully general read and write operations: arbitrary addresses, sizes, and alignments. Despite being simpler, it seems to outperform theMemoryincell_memory.rsin many situations. - solver_
utils - Simple utilities for interacting with the solver
- watchpoints
- Structures for defining and processing memory watchpoints
Structs§
- Execution
Manager - An
ExecutionManagerallows you to symbolically explore executions of a function. Conceptually, it is anIteratorover possible paths through the function. Callingnext()on anExecutionManagerexplores another possible path, returning either anOkwith aReturnValuerepresenting the function’s symbolic return value at the end of that path, or anErrif an error was encountered while processing the path. - Location
- Fully describes a code location within the LLVM IR.
- Location
Description - Describes a location in LLVM IR in a format more suitable for printing - for
instance, uses function names rather than references to
Functionobjects. For a richer representation of a code location, seeLocation. - Path
Entry - Describes one segment of a path through the LLVM IR. The “segment” will be one or more consecutive instructions in a single basic block.
- Project
- A
Projectis a collection of LLVM code to be explored, consisting of one or more LLVM modules. - State
- A
Statedescribes the full program state at a given moment during symbolic execution.
Enums§
- BBInstr
Index - Denotes either a particular instruction in a basic block, or its terminator.
- Error
- Error types used throughout this crate.
- Parameter
Val - Return
Value - A simple enum describing the value returned from a function
- Solution
Value - A simple enum describing either an integer value or a pointer
Functions§
- find_
zero_ of_ func - Given a function, find values of its inputs such that it returns zero.
- get_
path_ length - Returns the number of LLVM instructions in a passed path. The returned value is only accurate if the path under analysis does not include a panic, exception, exit, or any hooked calls (such as inline assembly).
- get_
possible_ return_ values_ of_ func - Get a description of the possible return values of a function, for given argument values. Considers all possible paths through the function given these arguments.
- symex_
function - Begin symbolic execution of the function named
funcname, obtaining anExecutionManager.
Type Aliases§
- Result
- A type alias for convenience, similar to how
std::io::Resultis used for I/O operations