Skip to content

Commit 1c64a98

Browse files
committed
fix: set finalized only after finalize completes successfully
Move `self.finalized = true` to the end of `finalize()` so an error or panic during IR dump, verification, or optimization leaves the compiler retryable instead of stuck in a finalized state.
1 parent b70076a commit 1c64a98

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • crates/revmc/src/compiler

crates/revmc/src/compiler/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,6 @@ impl<B: Backend> EvmCompiler<B> {
595595
if self.finalized {
596596
return Ok(());
597597
}
598-
self.finalized = true;
599598

600599
let finalize_start = Instant::now();
601600

@@ -642,6 +641,7 @@ impl<B: Backend> EvmCompiler<B> {
642641
}
643642
}
644643
}
644+
self.finalized = true;
645645

646646
let finalize_total = &self.remarks.finalize_total;
647647
finalize_total.set(finalize_total.get() + finalize_start.elapsed());

0 commit comments

Comments
 (0)