diff options
| author | Mason Reed <mason@vector35.com> | 2024-11-06 11:07:57 -0500 |
|---|---|---|
| committer | Mason Reed <mason@vector35.com> | 2024-11-08 03:13:53 -0500 |
| commit | 0bafdd69f36841090eb584abe1efc5b8f55927ed (patch) | |
| tree | 0b061ddcbb84d52df8e4ee59f554942fbdc534e6 /plugins | |
| parent | 51d9a9c1d36cbf183f9b8b9fa3b64dc4997da83e (diff) | |
WARP: Check constant values for probable constant pointer usage
This will eleviate some of the indeterministic behavior of LLIL constant and constant pointer usage
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/warp/src/lib.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/warp/src/lib.rs b/plugins/warp/src/lib.rs index 1e7c8389..4240c79f 100644 --- a/plugins/warp/src/lib.rs +++ b/plugins/warp/src/lib.rs @@ -129,6 +129,14 @@ pub fn basic_block_guid<A: Architecture, M: FunctionMutability, V: NonSSAVariant VisitorAction::Halt } ExprInfo::ExternPtr(_) => VisitorAction::Halt, + ExprInfo::Const(op) + if !view.functions_at(op.value()).is_empty() + || view.data_variable_at_address(op.value()).is_some() => + { + // Constant Pointer promotion for Constants that would be promoted at MLIL. + // If the value backs a symbol than we are eagerly masking for the sake of simplicity. + VisitorAction::Halt + } _ => VisitorAction::Descend, }) == VisitorAction::Halt { |
