From 0bafdd69f36841090eb584abe1efc5b8f55927ed Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Wed, 6 Nov 2024 11:07:57 -0500 Subject: WARP: Check constant values for probable constant pointer usage This will eleviate some of the indeterministic behavior of LLIL constant and constant pointer usage --- plugins/warp/src/lib.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'plugins') 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 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 { -- cgit v1.3.1