From 0761bc59315faa57a61a93a65557e1603dd7b3ec Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Thu, 20 Nov 2025 18:01:48 -0500 Subject: [PATCH 1/2] [WARP] Fix leaking binary view on empty views Can be triggered by trying to run the processor on a file with no functions. Found this while doing misc performance testing on windows. --- plugins/warp/src/processor.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/warp/src/processor.rs b/plugins/warp/src/processor.rs index 4f0372e61..2319c5fc6 100644 --- a/plugins/warp/src/processor.rs +++ b/plugins/warp/src/processor.rs @@ -664,6 +664,8 @@ impl WarpFileProcessor { if view.functions().is_empty() { self.state .set_file_state(path.clone(), ProcessingFileState::Processed); + // Close the view manually, see comment in [`BinaryView`]. + view.file().close(); return Err(ProcessingError::SkippedFile(path)); } From 437a3498fbda116d27c99bec61bcc057b0b3eaa3 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Thu, 20 Nov 2025 18:06:54 -0500 Subject: [PATCH 2/2] [WARP] Stop propagating skipped file error when processing archives Should have the same behavior as doing it on a directory --- plugins/warp/src/processor.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/warp/src/processor.rs b/plugins/warp/src/processor.rs index 2319c5fc6..df26f613e 100644 --- a/plugins/warp/src/processor.rs +++ b/plugins/warp/src/processor.rs @@ -772,6 +772,10 @@ impl WarpFileProcessor { }) .filter_map(|res| match res { Ok(result) => Some(Ok(result)), + Err(ProcessingError::SkippedFile(path)) => { + log::debug!("Skipping archive file: {:?}", path); + None + } Err(ProcessingError::Cancelled) => Some(Err(ProcessingError::Cancelled)), Err(e) => { log::error!("Archive file processing error: {:?}", e);