Skip to content

Commit

Permalink
fix(vm): remove go:nosplit from RunInstruction func (#683)
Browse files Browse the repository at this point in the history
When debugging (with go-delve) some optimizations are skipped which
mean this function exceeds the maximum Go stack frame. When this
happens, Go usually splits the function but since there was an explicit
"nosplit" the code is unable to compile and makes impossible to debug
any functionality that uses `RunInstruction`.
  • Loading branch information
rodrigo-pino authored Jan 17, 2025
1 parent fae330d commit 8aff6b7
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion pkg/vm/vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ func (vm *VirtualMachine) RunStep(hintRunner HintRunner) error {

const RC_OFFSET_BITS = 16

//go:nosplit
func (vm *VirtualMachine) RunInstruction(instruction *asmb.Instruction) error {

var off0 int = int(instruction.OffDest) + (1 << (RC_OFFSET_BITS - 1))
Expand Down

0 comments on commit 8aff6b7

Please sign in to comment.