Skip to content

Commit 8aff6b7

Browse files
authored
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`.
1 parent fae330d commit 8aff6b7

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

pkg/vm/vm.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ func (vm *VirtualMachine) RunStep(hintRunner HintRunner) error {
169169

170170
const RC_OFFSET_BITS = 16
171171

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

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

0 commit comments

Comments
 (0)