From 6a16de2a156822f939c7573a30281e1f5411c5f2 Mon Sep 17 00:00:00 2001 From: Jacob Chia Date: Tue, 3 Oct 2023 11:41:49 +0800 Subject: [PATCH] Fix #211: ignore the currently executing corpus when GC --- core/src/scheduler.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/scheduler.rs b/core/src/scheduler.rs index 8227e72dd..9dc744f87 100644 --- a/core/src/scheduler.rs +++ b/core/src/scheduler.rs @@ -237,7 +237,8 @@ where }); for i in sorted.iter().take(PRUNE_AMT) { - if *i.0 >= 3 { + // Ignore the artifacts (*i.0 < 3) and the currently executing corpus (*i.0 == idx). + if *i.0 >= 3 && *i.0 != idx { to_remove.push(*i.0); } }