Skip to content

Commit

Permalink
fix: free emulator dump
Browse files Browse the repository at this point in the history
  • Loading branch information
krigga committed Jul 9, 2024
1 parent d46261c commit 483623a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crypto/vm/vm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -441,10 +441,16 @@ int VmState::step() {
if (log.log_mask & vm::VmLog::DumpStackVerbose) {
mode += 4;
}
std::unique_ptr<VmStateInterface> tmp_ctx;
// install temporary dummy vm state interface to prevent charging for cell load operations during dump
VmStateInterface::Guard(tmp_ctx.get());
stack->dump(ss, mode);
VM_LOG(this) << "stack:" << ss.str();
}
if (stack_trace) {
std::unique_ptr<VmStateInterface> tmp_ctx;
// install temporary dummy vm state interface to prevent charging for cell load operations during dump
VmStateInterface::Guard(tmp_ctx.get());
stack->dump(std::cerr, 3);
}
++steps;
Expand Down

0 comments on commit 483623a

Please sign in to comment.