fix(verify): fix flaky JIT tests with global buffers and KeepAlive
Test / vet (push) Successful in 49s
Test / test (push) Failing after 2m9s
Test / build (push) Skipped

This commit is contained in:
2026-08-05 23:09:54 +02:00
parent 23b3d3e152
commit 19b37569c0
10 changed files with 323 additions and 38 deletions
+3
View File
@@ -6,6 +6,7 @@ package verify
import (
"bytes"
"math/rand"
"runtime"
"testing"
"unsafe"
)
@@ -288,6 +289,8 @@ func callDecodeBlockAVX2Raw(t *testing.T, k *Kernel, src, dst []byte) (int, int)
PutUint64(args, 40, uint64(cap(dst)))
out, err := k.CallFunc("decodeBlockAVX2", args)
runtime.KeepAlive(src)
runtime.KeepAlive(dst)
if err != nil {
t.Fatalf("CallFunc(decodeBlockAVX2): %v", err)
}