Potential Bug: Stack is cleared after Daedalus function call
lmichaelis opened this issue · comments
Luis Michaelis commented
There might be a problem with this code, if a Daedalus function is called from within an external, because the entire stack (including previous function's stacks) might be cleared:
ZenKit/include/zenkit/DaedalusVm.hh
Lines 153 to 170 in 7121a33
Instead, we should clear the stack up to the previous call frame (taking into account return values). There should also be an unsafe function to trigger this behaviour from C and wrappers.
Luis Michaelis commented
Fixed in f53a955 by properly counting stack size.