From 6a4bdd31db6917e66297dc2511407a057c8ccb86 Mon Sep 17 00:00:00 2001 From: Takeshi Yoneda Date: Mon, 17 Apr 2023 16:44:30 -0700 Subject: [PATCH] compiler: fixes false-positive invalid ptr detection in -race (#1376) Signed-off-by: Takeshi Yoneda --- internal/engine/compiler/engine.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/engine/compiler/engine.go b/internal/engine/compiler/engine.go index c4625d0bfe..07307bb313 100644 --- a/internal/engine/compiler/engine.go +++ b/internal/engine/compiler/engine.go @@ -1075,7 +1075,7 @@ func (si *stackIterator) Next() bool { si.base = int(si.stack[frame+1] >> 3) // *function lives in the third field of callFrame struct. This must be // aligned with the definition of callFrame struct. - si.fn = (*function)(unsafe.Pointer(uintptr(si.stack[frame+2]))) + si.fn = *(**function)(unsafe.Pointer(&si.stack[frame+2])) return si.fn != nil }