Skip to content

Commit

Permalink
Fix tests and deadlock
Browse files Browse the repository at this point in the history
  • Loading branch information
zlangley committed Jan 3, 2025
1 parent cc90a2e commit 91ec592
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
1 change: 0 additions & 1 deletion crates/vm/src/arch/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ where
let mut segments = self.execute_segments(exe, input)?;
let final_memory = mem::take(&mut segments.last_mut().unwrap().final_memory);

#[allow(unused_variables)]
Ok(VmExecutorResult {
per_segment: segments
.into_iter()
Expand Down
8 changes: 4 additions & 4 deletions extensions/native/circuit/src/castf/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ fn negative_castf_overflow_test() {
let mut rng = create_seeded_rng();
let y = generate_uint_number(&mut rng);
prepare_castf_rand_write_execute(&mut tester, &mut chip, y, &mut rng);
drop(tester);
tester.build();

let mut chip_input = chip.generate_air_proof_input();
let trace = chip_input.raw.common_main.as_mut().unwrap();
Expand Down Expand Up @@ -134,7 +134,7 @@ fn negative_castf_memread_test() {
let mut rng = create_seeded_rng();
let y = generate_uint_number(&mut rng);
prepare_castf_rand_write_execute(&mut tester, &mut chip, y, &mut rng);
drop(tester);
tester.build();

let mut chip_input = chip.generate_air_proof_input();
let trace = chip_input.raw.common_main.as_mut().unwrap();
Expand Down Expand Up @@ -172,7 +172,7 @@ fn negative_castf_memwrite_test() {
let mut rng = create_seeded_rng();
let y = generate_uint_number(&mut rng);
prepare_castf_rand_write_execute(&mut tester, &mut chip, y, &mut rng);
drop(tester);
tester.build();

let mut chip_input = chip.generate_air_proof_input();
let trace = chip_input.raw.common_main.as_mut().unwrap();
Expand Down Expand Up @@ -210,7 +210,7 @@ fn negative_castf_as_test() {
let mut rng = create_seeded_rng();
let y = generate_uint_number(&mut rng);
prepare_castf_rand_write_execute(&mut tester, &mut chip, y, &mut rng);
drop(tester);
tester.build();

let mut chip_input = chip.generate_air_proof_input();
let trace = chip_input.raw.common_main.as_mut().unwrap();
Expand Down
6 changes: 2 additions & 4 deletions extensions/native/circuit/src/fri/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ impl<F: PrimeField32> FriReducedOpeningChip<F> {
record: FriReducedOpeningRecord<F>,
aux_cols_factory: &MemoryAuxColsFactory<F>,
slice: &mut [F],
memory: &Arc<Mutex<OfflineMemory<F>>>,
memory: &OfflineMemory<F>,
) {
let width = FriReducedOpeningCols::<F>::width();

Expand All @@ -461,8 +461,6 @@ impl<F: PrimeField32> FriReducedOpeningChip<F> {
..
} = record.instruction;

let memory = memory.lock().unwrap();

let length_read = memory.record_by_id(record.length_read);
let alpha_read = memory.record_by_id(record.alpha_read);
let a_ptr_read = memory.record_by_id(record.a_ptr_read);
Expand Down Expand Up @@ -560,7 +558,7 @@ impl<F: PrimeField32> FriReducedOpeningChip<F> {
record,
&aux_cols_factory,
&mut flat_trace[idx..idx + (length * width)],
&self.offline_memory,
&memory,
);
idx += length * width;
}
Expand Down

0 comments on commit 91ec592

Please sign in to comment.