You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This program is valid, yet -d=checkptr flags it as unsafe pointer arithmetic:
package main
import (
"reflect"
"unsafe"
)
var s []int
func main() {
s = make([]int, 10)
h := (*reflect.SliceHeader)(unsafe.Pointer(&s))
println(unsafe.Pointer(h.Data))
}
This is because I forgot to implement logic to handle rule 6 for -d=checkptr.