From 8aff6b70d52f1905be26e821906bafb0323f6462 Mon Sep 17 00:00:00 2001 From: Rodrigo Date: Fri, 17 Jan 2025 13:07:56 +0000 Subject: [PATCH] fix(vm): remove go:nosplit from RunInstruction func (#683) 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))