Skip to content

fix(script_debug): emit DEBUG_SCRIPT frame for early-exit error paths#148

Open
febyeji wants to merge 1 commit intosedited:feature_script_debugfrom
febyeji:script-debug/debug-macro-coverage
Open

fix(script_debug): emit DEBUG_SCRIPT frame for early-exit error paths#148
febyeji wants to merge 1 commit intosedited:feature_script_debugfrom
febyeji:script-debug/debug-macro-coverage

Conversation

@febyeji
Copy link
Copy Markdown

@febyeji febyeji commented Apr 6, 2026

Three early-return paths in EvalScript exit before the DEBUG_SCRIPT call, so the debugger trace has no frame for the failing step:

  1. SCRIPT_ERR_BAD_OPCODE — GetOp() decode failure
  2. SCRIPT_ERR_PUSH_SIZE — push data > 520 bytes
  3. SCRIPT_ERR_OP_COUNT — >201 non-push opcodes

Move the main DEBUG_SCRIPT call to right after GetOp() succeeds, and add a dedicated call with OP_INVALIDOPCODE for decode failures.

GetOp failure, push-size overflow, and op-count overflow all returned
before the DEBUG_SCRIPT call, leaving gaps in execution traces.
Move the main call earlier (right after GetOp) and add a dedicated
call for GetOp decode failure with OP_INVALIDOPCODE.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant