From c7ba91b2836ce4f21957d2d64896d73f32ed89f1 Mon Sep 17 00:00:00 2001 From: Chris Fallin Date: Fri, 24 Dec 2021 00:45:27 -0800 Subject: [PATCH] fuzzbug fix --- src/backend/schedule.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/backend/schedule.rs b/src/backend/schedule.rs index e932981..6cd90bf 100644 --- a/src/backend/schedule.rs +++ b/src/backend/schedule.rs @@ -89,17 +89,25 @@ impl Schedule { } } else { log::trace!("v{} waiting on {:?}", value.index(), operands); - ctx.remaining_inputs.insert(value, operands.len()); + let mut remaining = 0; for &input in operands { if input == Value::undef() { continue; } let input = f.resolve_alias(input); + if let &ValueDef::Operator(ref op, ..) = &f.values[input.index()] { + if op_rematerialize(op) { + continue; + } + } + ctx.waiting_on_value .entry(input) .or_insert_with(|| vec![]) .push(value); + remaining += 1; } + ctx.remaining_inputs.insert(value, remaining); } } &ValueDef::Alias(v) | &ValueDef::PickOutput(v, _) => {