diff options
| author | Mason Reed <mason@vector35.com> | 2025-08-26 23:43:32 -0400 |
|---|---|---|
| committer | Mason Reed <35282038+emesare@users.noreply.github.com> | 2025-09-03 21:19:03 +0000 |
| commit | 47e0f1f685119ebffecbb99d2cce35c53a384738 (patch) | |
| tree | 4c2f2a012ecf324fd0f56d3f06987d14c412103a /plugins/warp/src/plugin/ffi/function.rs | |
| parent | b157aa0a337dc89d6817f2a26d2c3dd1e44efc9a (diff) | |
[WARP] Fix generating lifted IL when function GUID is already cached
We do not need to consult the lifted IL if we have already cached the function GUID in the function metadata
Diffstat (limited to 'plugins/warp/src/plugin/ffi/function.rs')
| -rw-r--r-- | plugins/warp/src/plugin/ffi/function.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/plugins/warp/src/plugin/ffi/function.rs b/plugins/warp/src/plugin/ffi/function.rs index 7563bd96..b37d613b 100644 --- a/plugins/warp/src/plugin/ffi/function.rs +++ b/plugins/warp/src/plugin/ffi/function.rs @@ -37,11 +37,10 @@ pub unsafe extern "C" fn BNWARPGetFunction( analysis_function: *mut BNFunction, ) -> *mut BNWARPFunction { let function = Function::from_raw(analysis_function); - let Ok(lifted_il) = function.lifted_il() else { - return std::ptr::null_mut(); - }; - let function = build_function(&function, &lifted_il, false); - Arc::into_raw(Arc::new(function)) as *mut BNWARPFunction + match build_function(&function, || function.lifted_il().ok(), false) { + Some(function) => Arc::into_raw(Arc::new(function)) as *mut BNWARPFunction, + None => std::ptr::null_mut(), + } } #[no_mangle] |
