Open igorline opened 1 year ago
idk if generally there is a good solution here. for this example I'm thinking you can read the stack size delta upon entry into the node, if it is positive then clone the current stack values within that size delta temporarily, and upon node exit compare the cloned stack values to the ones currently there. If they match, don't let the traverser continue.
but there are edge cases galore in doing things like this. ie:
graph TD;
A[A: <br/> jumpdest <br/> push 1] --> B[B: <br/> jumpdest <br/> push 1];
B --> C[C: <br/> push A <br/> jump];
C --> A;
would break at B exit when it shouldnt