From 0a2da91d5c1a8fdf6414855e989d88be9449cc2e Mon Sep 17 00:00:00 2001 From: Rodrigo Date: Fri, 17 Jan 2025 12:45:40 +0000 Subject: [PATCH] fix(vm): remove go:nosplit from RunInstruction func 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`. --- pkg/vm/vm.go | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg/vm/vm.go b/pkg/vm/vm.go index 743c4c7c..98b58801 100644 --- a/pkg/vm/vm.go +++ b/pkg/vm/vm.go @@ -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))