The problem is here:
// write each result into state at op.targets ids
for ((node_id, _), result) in ssa.targets.iter().zip(results) {
on_write(*node_id, &result);
if state.insert(*node_id, result).is_some() {
return Err(InterpreterError::MultipleWrite(*node_id));
}
}
Namely: rust's zip is silently truncating one of the iterators.
Fix: insert a length check that there are exactly as many results as targets.
The problem is here:
Namely: rust's
zipis silently truncating one of the iterators.Fix: insert a length check that there are exactly as many results as targets.