Skip to content

Commit

Permalink
fix(DaedalusVm): always set the instance symbol to the instance being…
Browse files Browse the repository at this point in the history
… initialized
  • Loading branch information
lmichaelis committed Oct 13, 2024
1 parent 5017d30 commit db90db4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/DaedalusVm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,10 @@ void ZkDaedalusVm_initInstanceDirect(ZkDaedalusVm* slf, ZkDaedalusInstance* sym)
slf->handle.unsafe_set_gi(*sym);
if (global_self != nullptr) global_self->set_instance(*sym);

slf->handle.unsafe_call(slf->handle.find_symbol_by_instance(*sym));
auto* s = slf->handle.find_symbol_by_instance(*sym);
s->set_instance(*sym);

slf->handle.unsafe_call(s);

if (global_self != nullptr) global_self->set_instance(old_slf);
slf->handle.unsafe_set_gi(old_gi);
Expand Down

0 comments on commit db90db4

Please sign in to comment.