Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
cd1m0 committed Oct 14, 2024
1 parent d5fd79c commit 3cc8dd6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/debug/tracers/transformers/int_stack.ts
Original file line number Diff line number Diff line change
@@ -104,6 +104,15 @@ export async function addInternalFrame<

const lastStep = trace[trace.length - 1];

// If we are ending execution, and still have leftover internal frames, then internal frame decoding
// is probably broken.
if (state.op.opcode === OPCODES.STOP) {
const curExtFrame = topExtFrame(state.stack);

curExtFrame.internalFramesBroken =
curExtFrame.internalFramesBroken || curExtFrame.internalFrames.length > 1;
}

// External call/return - no change to internal stack
if (lastStep.depth !== state.depth) {
if (lastStep.op.opcode === OPCODES.RETURN) {

0 comments on commit 3cc8dd6

Please sign in to comment.