Skip to content

Commit

Permalink
fix: deadlock for garble-vm (#197)
Browse files Browse the repository at this point in the history
* fix(garble): do not hang when output is used as input

* fix(garble): fix hanging in preprocessing

* fix: adapt `is_committed` to consider complete outputs
  • Loading branch information
th4s authored Dec 13, 2024
1 parent 67e6295 commit 0eab0be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion crates/mpz-garble-core/src/view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ impl View {
}

pub(crate) fn is_committed(&self, range: Range) -> bool {
range.is_subset(&self.input.complete)
range.is_subset(&self.input.complete) || range.is_subset(&self.output.complete)
}

pub(crate) fn commit(&mut self, range: Range) -> Result<()> {
Expand Down
1 change: 1 addition & 0 deletions crates/mpz-garble/src/protocol/semihonest/evaluator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ impl<COT> Evaluator<COT> {
idx_outputs |= output.to_range();
true
} else {
idx_outputs |= output.to_range();
false
}
})
Expand Down

0 comments on commit 0eab0be

Please sign in to comment.