Skip to content

Instantly share code, notes, and snippets.

@rsc

rsc/unsafeptr.md Secret

Created June 27, 2023 20:39
Show Gist options
  • Save rsc/d56cf40e010112f67339340101f92f17 to your computer and use it in GitHub Desktop.
Save rsc/d56cf40e010112f67339340101f92f17 to your computer and use it in GitHub Desktop.

71325 modules analyzed. 70060 diagnostics generated matching possible misuse of unsafe.Pointer in 252 modules. 500 randomly sampled diagnostics.

(1) github.com/hspan/go-ole@v0.0.0/variant.go:33:42: possible misuse of unsafe.Pointer

}
var safeArray *SafeArray = (*SafeArray)(unsafe.Pointer(uintptr(v.Val)))
return &SafeArrayConversion{safeArray}

(2) github.com/goki/ki@v1.1.11/kit/ptrs_test.go:38:7: possible misuse of unsafe.Pointer

ov := reflect.ValueOf(obj)
f := unsafe.Pointer(ov.Pointer() + fld.Offset)
nw := reflect.NewAt(fld.Type, f)

(3) github.com/nikandfor/hacked@v0.0.0-20230429073333-a318d546207a/hfmt/low.go:197:9: possible misuse of unsafe.Pointer

	x := uintptr(p)
	return unsafe.Pointer(x ^ 0) //nolint:staticcheck
}

(4) github.com/lsg2020/gort@v0.0.0-20220515072951-7a7794baa036/gort_globals.go:89:42: possible misuse of unsafe.Pointer

	}
	d.globals[name] = reflect.NewAt(rtyp, unsafe.Pointer(uintptr(rAddr.Uint()))).Elem()
}

(5) github.com/kubeshark/ebpf@v0.9.2/map.go:806:29: possible misuse of unsafe.Pointer

// Provide an invalid value pointer to prevent a copy on the kernel side.
valuePtr := sys.NewPointer(unsafe.Pointer(^uintptr(0)))
randKey := make([]byte, int(m.keySize))

(6) github.com/goki/ki@v1.1.11/ki/node.go:1011:17: possible misuse of unsafe.Pointer

for _, fo := range foffs {
	fn := (*Node)(unsafe.Pointer(op + fo))
	fun(fn.This(), level, data)

(7) github.com/godevsig/adaptiveservice@v0.9.23/streamtransport.go:539:37: possible misuse of unsafe.Pointer

}()
msgChan := *(*chan interface{})(unsafe.Pointer(uintptr(tm.chanID)))
msgChan <- tm.msg

(8) gitlab.com/hestia-go/core@v0.0.0-20230409220739-124c04cba673/is/unsafe-ptr_test.go:46:14: possible misuse of unsafe.Pointer

name:     "unsafe pointer",
input:    unsafe.Pointer(uintptr(0)),
expected: true,

(9) github.com/zhangdapeng520/zdpgo_json@v0.1.5/reflect2/reflect2.go:288:9: possible misuse of unsafe.Pointer

	x := uintptr(p)
	return unsafe.Pointer(x ^ 0)
}

(10) github.com/hedzr/evendeep@v0.4.8/ftor.go:1527:18: possible misuse of unsafe.Pointer

	//goland:noinspection GoVetUnsafePointer
	to.SetPointer(unsafe.Pointer(ptr))
}

(11) github.com/bi-zone/go-ole@v1.2.5/variant.go:33:42: possible misuse of unsafe.Pointer

}
var safeArray *SafeArray = (*SafeArray)(unsafe.Pointer(uintptr(v.Val)))
return &SafeArrayConversion{safeArray}

(12) github.com/itsabgr/go-handy@v0.0.0-20220724000257-022d51f2b9c6/pointer.go:12:16: possible misuse of unsafe.Pointer

func DeRef[T any](ptr uintptr) T {
	return *((*T)(unsafe.Pointer(ptr)))
}

(13) github.com/ssgreg/logf@v1.4.1/noescape.go:14:9: possible misuse of unsafe.Pointer

	return unsafe.Pointer(x ^ 0)
}

(14) modernc.org/z@v1.7.4/lib/z_linux_386.go:18566:48: possible misuse of unsafe.Pointer

{
	*(*Bytef)(unsafe.Pointer((*Deflate_state)(unsafe.Pointer(s)).Fpending_buf + uintptr(libc.PostIncUint32(&(*Deflate_state)(unsafe.Pointer(s)).Fpending, 1)))) = (Uch(int32(((*Deflate_state)(unsafe.Pointer(s)).Fbi_buf)) >> 8))
}

(15) github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/internal/domain/formationconstraint/operators/utils.go:29:62: possible misuse of unsafe.Pointer

}()
jointPointAssignmentPointer := (*model.FormationAssignment)(unsafe.Pointer(jointPointDetailsAssignmentMemoryAddress))

(16) github.com/glycerine/go-capnproto@v0.0.0-20190118050403-2d07de3aa7fc/utils2_test.go:345:23: possible misuse of unsafe.Pointer

// Create a pointer to the underlying array
addPtr := (*[8]byte)(unsafe.Pointer(*(*uintptr)(address)))

(17) gitee.com/whilew/cream@v0.0.8/pkg/util/xcontext/xcontext.go:31:24: possible misuse of unsafe.Pointer

valCtx := (*valueCtx)(unsafe.Pointer(ictx.data))
if valCtx.Context != nil && valCtx != nil && valCtx.key != nil && valCtx.val != nil {

(18) github.com/nvi-inc/svipc@v0.1.0/syscall_linux_386.go:70:8: possible misuse of unsafe.Pointer

}
ptr = unsafe.Pointer(addr)
return

(19) github.com/lkarlslund/stringdedup@v0.6.2/common.go:22:17: possible misuse of unsafe.Pointer

func (wd weakdata) Pointer() *byte {
	return (*byte)(unsafe.Pointer(wd.data))
}

(20) go4.org/intern@v0.0.0-20230525184215-6c62f75575cb/intern.go:110:16: possible misuse of unsafe.Pointer

} else if addr, ok := valMap[k]; ok {
	v = (*Value)((unsafe.Pointer)(addr))
	v.resurrected = true

(21) github.com/integration-system/go-cmp@v0.0.0-20190131081942-ac5582987a2f/cmp/unsafe_reflect.go:22:31: possible misuse of unsafe.Pointer

func unsafeRetrieveField(v reflect.Value, f reflect.StructField) reflect.Value {
	return reflect.NewAt(f.Type, unsafe.Pointer(v.UnsafeAddr()+f.Offset)).Elem()
}

(22) github.com/shadialtarsha/go-pcre@v0.0.0-20220904164957-b4f1834ceecc/lib/pcre2_linux_386.go:52332:84: possible misuse of unsafe.Pointer

if !(int32((*Tmatch_block_8)(unsafe.Pointer(mb)).Fpartial) != 0 && ((*Theapframe)(unsafe.Pointer(F)).Feptr > (*Tmatch_block_8)(unsafe.Pointer(mb)).Fstart_used_ptr || (*Tmatch_block_8)(unsafe.Pointer(mb)).Fallowemptypartial != 0)) {
	goto __2955

(23) github.com/cybriq/gotiny@v0.0.5/decEngine.go:127:14: possible misuse of unsafe.Pointer

for i := 0; i < l; i++ {
	eEng(d, unsafe.Pointer(header.Data+uintptr(i)*size))
}

(24) github.com/jfcg/sorty/v2@v2.1.0/sorty.go:172:25: possible misuse of unsafe.Pointer

p, l := v.Pointer(), v.Len()
slc = sixb.Slice{Data: unsafe.Pointer(p), Len: l, Cap: l}
return

(25) github.com/mitranim/sqlb@v0.7.2/sqlb_util.go:1005:9: possible misuse of unsafe.Pointer

	// nolint:staticcheck
	return unsafe.Pointer(out ^ 0)
}

(26) github.com/bi-zone/go-ole@v1.2.5/variant.go:15:21: possible misuse of unsafe.Pointer

	}
	return (*IUnknown)(unsafe.Pointer(uintptr(v.Val)))
}

(27) github.com/mitranim/sqlb@v0.7.2/sqlb_util.go:1005:9: possible misuse of unsafe.Pointer

	// nolint:staticcheck
	return unsafe.Pointer(out ^ 0)
}

(28) github.com/wzzhu/tensor@v0.9.24/dense.go:383:19: possible misuse of unsafe.Pointer

if t.viewOf != 0 {
	return (*Dense)(unsafe.Pointer(t.viewOf))
}

(29) gitee.com/quant1x/gox@v1.7.6/gls/goid.go:27:21: possible misuse of unsafe.Pointer

// TODO: fatal error: checkptr: pointer arithmetic result points to invalid allocation
p_goid := (*int64)(unsafe.Pointer(g + goidOffset))
return *p_goid

(30) modernc.org/memory@v1.6.0/memory.go:212:10: possible misuse of unsafe.Pointer

a.pages[log] = p
(*page)(unsafe.Pointer(p)).log = log
return p, nil

(31) github.com/bir3/gocompiler@v0.3.205/src/internal/intern/intern.go:108:16: possible misuse of unsafe.Pointer

} else if addr, ok := valMap[k]; ok {
	v = (*Value)(unsafe.Pointer(addr))
	v.resurrected = true

(32) github.com/qiniu/x@v1.11.9/jsonutil/json_string.go:15:26: possible misuse of unsafe.Pointer

sh := *(*reflect.StringHeader)(unsafe.Pointer(&data))
arr := (*[1 << 30]byte)(unsafe.Pointer(sh.Data))
return json.Unmarshal(arr[:sh.Len], v)

(33) github.com/searKing/golang/go@v1.2.74/runtime/example_test.go:34:14: possible misuse of unsafe.Pointer

var sp *int
sp = (*int)(unsafe.Pointer(runtime.GetEIP(unsafe.Sizeof(uintptr(0)))))
//sp = (*int)(unsafe.Pointer(runtime.GetEIP(0)))

(34) github.com/imgk/caddy-trojan@v0.0.0-20221206043256-2631719e16c8/utils/utils.go:18:30: possible misuse of unsafe.Pointer

func StringToByteSlice(s string) []byte {
	return unsafe.Slice((*byte)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&s)))), len(s))
}

(35) github.com/goccy/go-reflect@v1.2.0/reflect_test.go:70:43: possible misuse of unsafe.Pointer

v := reflect.NewAt(ivalFromField.Type(), unsafe.Pointer(ivalFromField.UnsafeAddr())).Elem()
ival.Set(v)

(36) github.com/zhuochengs/xorm-builder@v0.0.0-20230512032458-6fc6ca6d0f6d/strings_builder.go:29:9: possible misuse of unsafe.Pointer

	x := uintptr(p)
	return unsafe.Pointer(x ^ 0)
}

(37) github.com/eyecuelab/kit@v0.0.0-20220223223605-2c24670f17c0/pretty/diff_test.go:120:30: possible misuse of unsafe.Pointer

{
	struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},
	struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},

(38) github.com/teh-cmc/mmm@v0.0.0-20160717174312-f3d5d92d1c27/experiment/experiment.go:134:13: possible misuse of unsafe.Pointer

for i := range ptrs {
	ptrs[i] = unsafe.Pointer(intz.Pointer(i))
}

(39) gobot.io/x/gobot@v1.16.0/drivers/i2c/i2c_test.go:18:35: possible misuse of unsafe.Pointer

if (trap == syscall.SYS_IOCTL) && (a2 == sysfs.I2C_FUNCS) {
	var funcPtr *uint64 = (*uint64)(unsafe.Pointer(a3))
	*funcPtr = sysfs.I2C_FUNC_SMBUS_READ_BYTE | sysfs.I2C_FUNC_SMBUS_READ_BYTE_DATA |

(40) github.com/switchupcb/yaegi@v0.10.2/stdlib/unsafe/unsafe.go:63:18: possible misuse of unsafe.Pointer

func uintptrToUnsafePtr(src, dest reflect.Value) {
	dest.SetPointer(unsafe.Pointer(src.Interface().(uintptr))) //nolint:govet
}

(41) github.com/bookerzzz/grok@v0.0.0/stack.go:154:13: possible misuse of unsafe.Pointer

//v := reflect.Indirect(reflect.ValueOf((*interface{})(unsafe.Pointer(a.Pointer))))
v := unsafe.Pointer(a.Pointer)
if v != nil {

(42) github.com/gofiber/fiber/v2@v2.47.0/internal/go-ole/variant.go:33:42: possible misuse of unsafe.Pointer

}
var safeArray *SafeArray = (*SafeArray)(unsafe.Pointer(uintptr(v.Val)))
return &SafeArrayConversion{safeArray}

(43) github.com/smasher164/mem@v0.0.0-20200311200026-6e9ed23f934d/mem.go:69:12: possible misuse of unsafe.Pointer

	p.allocated = true
	return unsafe.Pointer(ret)
}

(44) github.com/jfcg/sorty@v1.2.0/sortyLen.go:32:25: possible misuse of unsafe.Pointer

p, l := v.Pointer(), v.Len()
slc = sixb.Slice{Data: unsafe.Pointer(p), Len: l, Cap: l}
return

(45) gitee.com/quant1x/gox@v1.7.6/api/channel.go:28:20: possible misuse of unsafe.Pointer

	cptr += unsafe.Sizeof(uint16(0))
	return *(*uint32)(unsafe.Pointer(cptr)) > 0
}

(46) golang.zx2c4.com/go118/netip@v0.0.0-20211111135330-a4a02eeacf9d/internal/intern/intern.go:101:16: possible misuse of unsafe.Pointer

} else if addr, ok := valMap[k]; ok {
	v = (*Value)(unsafe.Pointer(addr))
	v.resurrected = true

(47) github.com/platinasystems/nvram@v1.0.1-0.20190709235807-51a23abd5aec/coreboot_table.go:120:25: possible misuse of unsafe.Pointer

virtAddr := uintptr(unsafe.Pointer(&t.mem[0])) + phyAddr - t.baseAddr
header = (*lbHeader)(unsafe.Pointer(virtAddr))

(48) github.com/as/shiny@v0.8.2/driver/x11driver/shm_linux_ipc.go:30:13: possible misuse of unsafe.Pointer

if errno0 != 0 {
	return 0, unsafe.Pointer(uintptr(0)), fmt.Errorf("shmget: %v", errno0)
}

(49) go-ml.dev/pkg/base@v0.0.0-20200610162856-60c38abac71b/fu/index.go:12:9: possible misuse of unsafe.Pointer

	of := pv.Elem().Type().Size() * uintptr(i)
	return unsafe.Pointer(pv.Pointer() + of)
}

(50) github.com/alphadose/zenq/v2@v2.8.2/zenq.go:181:21: possible misuse of unsafe.Pointer

func (self *ZenQ[T]) Read() (data T, queueOpen bool) {
	slot := (*slot[T])(unsafe.Pointer(uintptr(self.strideLength)*(uintptr(self.indexMask)&uintptr(self.readerIndex.Add(1))) + uintptr(self.contents)))

(51) github.com/spaolacci/murmur3@v1.1.0/murmur32.go:129:20: possible misuse of unsafe.Pointer

for ; p < p1; p += 4 {
	k1 := *(*uint32)(unsafe.Pointer(p))

(52) github.com/flachnetz/go-forceexport@v1.0.0/forceexport.go:48:21: possible misuse of unsafe.Pointer

funcValuePtr := reflect.ValueOf(newFuncVal).FieldByName("ptr").Pointer()
funcPtr := (*Func)(unsafe.Pointer(funcValuePtr))
funcPtr.codePtr = codePtr

(53) github.com/lkarlslund/gonk@v0.0.0-20230414120804-21c23f637b3d/gonk.go:416:76: possible misuse of unsafe.Pointer

} else {
	if !atomic.CompareAndSwapPointer(&g.backing, unsafe.Pointer(oldBacking), unsafe.Pointer(uintptr(0))) {
		panic("Backing was changed behind my back")

(54) github.com/night-codes/go-json@v0.9.15/decode.go:135:9: possible misuse of unsafe.Pointer

	x := uintptr(p)
	return unsafe.Pointer(x ^ 0)
}

(55) github.com/vela-security/vela-public@v1.1.11/lua/anydata.go:256:28: possible misuse of unsafe.Pointer

case reflect.Uint8:
	return LNumber(*(*uint8)(unsafe.Pointer(ad.ptr + field.Offset)))
case reflect.Uint16:

(56) github.com/fengyoulin/shm@v0.0.0-20200305015033-287e184bdf0a/map.go:320:28: possible misuse of unsafe.Pointer

// new db, init hash area, set index to -1
hs := (*[maxMapCap]hash)(unsafe.Pointer(sh.Data + uintptr(h.hashOff)))
for i := 0; i < int(h.cap); i++ {

(57) github.com/searKing/golang/go@v1.2.74/runtime/runtime.go:42:9: possible misuse of unsafe.Pointer

	x := uintptr(p)
	return unsafe.Pointer(x ^ 0)
}

(58) github.com/leromarinvit/goid@v0.0.0-20170210194639-329af3046b24/goid.go:57:9: possible misuse of unsafe.Pointer

mcall(func(g uintptr) {
	id := unsafe.Pointer(g + offsetGoid)
	goid = *(*int64)(id)

(59) github.com/KarpelesLab/contexter@v1.0.2/contexter.go:116:13: possible misuse of unsafe.Pointer

ti.tab = (*itab)(unsafe.Pointer(uintptr(i1)))
ti.data = unsafe.Pointer(uintptr(i2))
return true

(60) github.com/lkarlslund/stringdedup@v0.6.2/common.go:22:17: possible misuse of unsafe.Pointer

func (wd weakdata) Pointer() *byte {
	return (*byte)(unsafe.Pointer(wd.data))
}

(61) github.com/mattn/go-adodb@v0.0.1/adodb.go:534:31: possible misuse of unsafe.Pointer

	}
	dest[i] = (*[1 << 30]byte)(unsafe.Pointer(uintptr(sa.Data)))[0:elems]
}

(62) github.com/chunqian/tinylog@v0.0.0-20230425011911-b61a1300f323/pretty/diff_test.go:121:30: possible misuse of unsafe.Pointer

struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},
struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},
nil,

(63) github.com/cznic/memory@v0.0.0-20181122101858-44f9dcde99e8/all_test.go:244:15: possible misuse of unsafe.Pointer

for j := 0; j < b.size; j++ {
	*(*byte)(unsafe.Pointer(b.p + uintptr(j))) = 0
}

(64) modernc.org/fontconfig@v1.0.10/lib/fontconfig_linux_386.go:51499:15: possible misuse of unsafe.Pointer

(*FcPattern)(unsafe.Pointer(pat_serialized)).Felts_offset = (Intptr_t((elts_serialized)) - Intptr_t((pat_serialized)))

(65) github.com/alexyer/taggedptr@v0.0.0-20160103160510-29e0338f9028/taggedptr_test.go:75:51: possible misuse of unsafe.Pointer

if _ = AttemptTag(&casPtr, casPtr, 1); casPtr != unsafe.Pointer(uintptr(initialPtr)|1) {
	t.Fatal("wrong tag attempt")

(66) github.com/shadialtarsha/go-pcre@v0.0.0-20220904164957-b4f1834ceecc/lib/pcre2_linux_386.go:48785:40: possible misuse of unsafe.Pointer

}
notmatch2 = libc.Bool32(*(*Tuint32_t)(unsafe.Pointer(F + 32 + 2*4)) == OP_NOTPROP)
switch proptype {

(67) github.com/kamalshkeir/kencoding@v0.0.1/json/codec.go:842:9: possible misuse of unsafe.Pointer

	x := uintptr(p)
	return unsafe.Pointer(x ^ 0)
}

(68) github.com/viant/toolbox@v0.34.5/unsafe/pointer.go:259:25: possible misuse of unsafe.Pointer

result = func(structAddr uintptr) interface{} {
	return (*[]float32)(unsafe.Pointer(structAddr + offset))
}

(69) github.com/wanlay/gorm-dm8@v1.0.5/dmr/security/zzf.go:137:15: possible misuse of unsafe.Pointer

	p ++
	b = (*byte)(unsafe.Pointer(p))
}

(70) github.com/cnotch/ipchub@v1.1.0/utils/murmur/murmur.go:53:20: possible misuse of unsafe.Pointer

for ; p < p1; p += 4 {
	k1 := *(*uint32)(unsafe.Pointer(p))

(71) github.com/jfcg/sorty/v2@v2.1.0/sorty.go:172:25: possible misuse of unsafe.Pointer

p, l := v.Pointer(), v.Len()
slc = sixb.Slice{Data: unsafe.Pointer(p), Len: l, Cap: l}
return

(72) code.witches.io/go/sdl2@v0.1.1/noescape.go:10:9: possible misuse of unsafe.Pointer

	x := uintptr(p)
	return unsafe.Pointer(x ^ 0)
}

(73) github.com/gorgonia/agogo@v0.1.1/mcts/unsafe.go:5:58: possible misuse of unsafe.Pointer

func treeFromUintptr(ptr uintptr) *MCTS { return (*MCTS)(unsafe.Pointer(ptr)) }

(74) github.com/zeebo/goof@v0.0.0-20190312211016-1ee209ef0510/troop_globals.go:65:10: possible misuse of unsafe.Pointer

ptr := unsafe.Pointer(uintptr(loc))
t.globals[name] = reflect.NewAt(rtyp, ptr).Elem()

(75) github.com/huydx/murmur3@v0.0.0-20160224074654-db9a0e6a5005/murmur32.go:117:20: possible misuse of unsafe.Pointer

for ; p < p1; p += 4 {
	k1 := *(*uint32)(unsafe.Pointer(p))

(76) github.com/glide-im/glide@v1.6.0/pkg/hash/hash.go:32:20: possible misuse of unsafe.Pointer

for ; p < p1; p += 4 {
	k1 := *(*uint32)(unsafe.Pointer(p))

(77) github.com/lkarlslund/go-ole@v1.2.1/variant.go:23:22: possible misuse of unsafe.Pointer

	}
	return (*IDispatch)(unsafe.Pointer(uintptr(v.Val)))
}

(78) github.com/golang-infrastructure/go-reflect-utils@v0.0.0-20221130143747-965ef2eb09c3/channel.go:56:7: possible misuse of unsafe.Pointer

cptr += unsafe.Sizeof(uint16(0))
t := unsafe.Pointer(cptr)
fmt.Println(t)

(79) github.com/batchcorp/thrift-iterator@v0.0.0-20220918180557-4c4a158fc6e9/binding/reflection/encode_slice.go:22:10: possible misuse of unsafe.Pointer

for i := 0; i < slice.Len; i++ {
	addr = unsafe.Pointer(offset)
	if encoder.elemType.Kind() == reflect.Map {

(80) github.com/docker-library/go-dockerlibrary@v0.0.0-20200821205225-669fbe5c1d52/pkg/templatelib/lib_test.go:20:26: possible misuse of unsafe.Pointer

err = tmpl.Execute(nil, unsafe.Pointer(uintptr(0)))
if err == nil {

(81) github.com/fmstephe/unsafeutil@v1.0.0/convert_test.go:96:11: possible misuse of unsafe.Pointer

y := reflect.SliceHeader{}
x.data = unsafe.Pointer(y.Data)
y.Data = uintptr(x.data)

(82) github.com/funkygao/pretty@v0.0.0-20130510082846-bc9499caa0f4/formatter_test.go:46:3: possible misuse of unsafe.Pointer

//{make(chan int), "(chan int)(0x1234)"},
{unsafe.Pointer(uintptr(1)), "unsafe.Pointer(0x1)"},
{func(int) {}, "func(int) {...}"},

(83) github.com/vela-security/vela-public@v1.1.11/lua/anydata.go:262:29: possible misuse of unsafe.Pointer

case reflect.Uint64:
	return LNumber(*(*uint64)(unsafe.Pointer(ad.ptr + field.Offset)))

(84) github.com/arnehormann/sqlinternals@v0.0.0-20170823191638-d9cb0cffad4e/unsafe.go:125:27: possible misuse of unsafe.Pointer

rowsiPtr := offsetRowsRowsi + (uintptr)((unsafe.Pointer)(rows))
rowsi := *(*driver.Rows)((unsafe.Pointer)(rowsiPtr))
if rowsi == nil {

(85) github.com/pkg/expect@v0.0.0-20191209053905-1fe4c9394a8a/t.go:26:23: possible misuse of unsafe.Pointer

	}
	return (*testing.T)(unsafe.Pointer(p))
}

(86) golang.org/x/exp/shiny@v0.0.0-20230522175609-2e198f4a06a1/driver/x11driver/shm_linux_ipc.go:39:13: possible misuse of unsafe.Pointer

if errno2 != 0 {
	return 0, unsafe.Pointer(uintptr(0)), fmt.Errorf("shmctl: %v", errno2)
}

(87) github.com/viant/toolbox@v0.34.5/unsafe/pointer.go:61:20: possible misuse of unsafe.Pointer

result = func(structAddr uintptr) interface{} {
	return (*uint8)(unsafe.Pointer(structAddr + offset))
}

(88) modernc.org/strutil@v1.1.3/all_test.go:183:18: possible misuse of unsafe.Pointer

	Uintptr:       uintptr(99),
	UnsafePointer: unsafe.Pointer(uintptr(0x12345678)),
}

(89) github.com/xmlking/toolkit/broker/pubsub@v0.3.4/message_mock_test.go:60:26: possible misuse of unsafe.Pointer

//Create a pointer based on the address
doneFuncFieldPointer := unsafe.Pointer(doneFuncFieldAddress)

(90) github.com/lrita/cmap@v0.0.0-20220613164007-7fbf4a5bd437/cmap.go:342:9: possible misuse of unsafe.Pointer

	x := uintptr(p)
	return unsafe.Pointer(x ^ 0)
}

(91) github.com/night-codes/go-json@v0.9.15/decode.go:135:9: possible misuse of unsafe.Pointer

	x := uintptr(p)
	return unsafe.Pointer(x ^ 0)
}

(92) github.com/afumu/libc@v0.0.6/musl_linux_386.go:5124:23: possible misuse of unsafe.Pointer

}
if int32(*(*uint8_t)(unsafe.Pointer(a))) == 0xfe && int32(*(*uint8_t)(unsafe.Pointer(a + 1)))&0xc0 == 0x80 {
	return 2

(93) github.com/tetratelabs/wazero@v1.2.1/internal/engine/compiler/compiler_post1_0_test.go:861:21: possible misuse of unsafe.Pointer

	}
	return (*function)(unsafe.Pointer(ptr))
}

(94) github.com/tomatome/win@v0.3.1/types.go:4814:39: possible misuse of unsafe.Pointer

func (this *PROPSHEETHEADER_V2) PStartPage() string {
	return stringFromUnicode16((*uint16)(unsafe.Pointer(this.union2)))
}

(95) github.com/afumu/libc@v0.0.6/musl_linux_386.go:4009:14: possible misuse of unsafe.Pointer

if !(_sh != 0) {
	*(*int32)(unsafe.Pointer(X__h_errno_location(tls))) = 3
	return uintptr(0)

(96) github.com/chunqian/pretty@v0.0.0-20200305075802-e57086a8d0c4/diff_test.go:120:30: possible misuse of unsafe.Pointer

{
	struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},
	struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},

(97) vitess.io/vitess@v0.16.2/go/tools/sizegen/integration/cached_size.go:118:32: possible misuse of unsafe.Pointer

numBuckets := int(math.Pow(2, float64((*(*uint8)(unsafe.Pointer(hmap.Pointer() + uintptr(9)))))))
numOldBuckets := (*(*uint16)(unsafe.Pointer(hmap.Pointer() + uintptr(10))))
size += hack.RuntimeAllocSize(int64(numOldBuckets * 208))

(98) github.com/gabe-lee/unsafer@v0.1.1/unsafer.go:301:27: possible misuse of unsafe.Pointer

a.Data = data
a.Type = (*TypeInternal)(unsafe.Pointer(typePointer))
return value

(99) github.com/kost/gosc@v0.0.0-20230110210303-490723ad1528/shell/shell_default.go:30:29: possible misuse of unsafe.Pointer

func getPage(p uintptr) []byte {
	return (*(*[0xFFFFFF]byte)(unsafe.Pointer(p & ^uintptr(syscall.Getpagesize()-1))))[:syscall.Getpagesize()]
}

(100) github.com/kamalshkeir/kencoding@v0.0.1/json/codec.go:842:9: possible misuse of unsafe.Pointer

	x := uintptr(p)
	return unsafe.Pointer(x ^ 0)
}

(101) gitlab.com/ethan.reesor/vscode-notebooks/yaegi@v0.0.0-20220417214422-5c573557938e/stdlib/unsafe/unsafe.go:63:18: possible misuse of unsafe.Pointer

func uintptrToUnsafePtr(src, dest reflect.Value) {
	dest.SetPointer(unsafe.Pointer(src.Interface().(uintptr))) //nolint:govet
}

(102) vitess.io/vitess@v0.16.2/go/tools/sizegen/integration/cached_size.go:140:52: possible misuse of unsafe.Pointer

hmap := reflect.ValueOf(cached.field1)
numBuckets := int(math.Pow(2, float64((*(*uint8)(unsafe.Pointer(hmap.Pointer() + uintptr(9)))))))
numOldBuckets := (*(*uint16)(unsafe.Pointer(hmap.Pointer() + uintptr(10))))

(103) github.com/lkarlslund/go-ole@v1.2.1/variant.go:23:22: possible misuse of unsafe.Pointer

	}
	return (*IDispatch)(unsafe.Pointer(uintptr(v.Val)))
}

(104) github.com/apache/beam/sdks/v2@v2.48.2/go/pkg/beam/core/util/ioutilx/read.go:97:9: possible misuse of unsafe.Pointer

	//lint:ignore SA4016 see function comment
	return unsafe.Pointer(x ^ 0)
}

(105) github.com/3JoB/go-json@v0.10.4/decode.go:167:9: possible misuse of unsafe.Pointer

	x := uintptr(p)
	return unsafe.Pointer(x ^ 0)
}

(106) github.com/arr-ai/hash@v0.8.0/stubs.go:52:9: possible misuse of unsafe.Pointer

	x := uintptr(p)
	return unsafe.Pointer(x ^ 0) //nolint:staticcheck
}

(107) github.com/sagernet/sing-box@v1.2.7/transport/vless/vision.go:87:29: possible misuse of unsafe.Pointer

input:    (*bytes.Reader)(unsafe.Pointer(reflectPointer + input.Offset)),
rawInput: (*bytes.Buffer)(unsafe.Pointer(reflectPointer + rawInput.Offset)),
netConn:  netConn,

(108) github.com/jfcg/sorty@v1.2.0/sortyLen.go:32:25: possible misuse of unsafe.Pointer

p, l := v.Pointer(), v.Len()
slc = sixb.Slice{Data: unsafe.Pointer(p), Len: l, Cap: l}
return

(109) github.com/pharosnet/flyline@v1.0.2/array.go:58:20: possible misuse of unsafe.Pointer

entryPtr := basePtr + uintptr(seq&mask*align)*mSize
e = *((*(*entry))(unsafe.Pointer(entryPtr)))
return

(110) gorgonia.org/gorgonia@v0.9.17/values.go:165:17: possible misuse of unsafe.Pointer

case tensor.Bool:
	retVal = (*B)(unsafe.Pointer(mem.Uintptr()))
default:

(111) github.com/motomux/pretty@v0.0.0-20161209205251-b2aad2c9a95d/diff_test.go:122:30: possible misuse of unsafe.Pointer

{
	struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},
	struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},

(112) github.com/lsg2020/gort@v0.0.0-20220515072951-7a7794baa036/helpers.go:83:21: possible misuse of unsafe.Pointer

funcValuePtr := reflect.ValueOf(newFuncVal).FieldByName("ptr").Pointer()
funcPtr := (*Func)(unsafe.Pointer(funcValuePtr))
funcPtr.codePtr = uintptr(codePtr)

(113) github.com/modern-go/gls@v0.0.0-20220109145502-612d0167dce5/goid.go:23:21: possible misuse of unsafe.Pointer

g := getg()
p_goid := (*int64)(unsafe.Pointer(g + goidOffset))
return *p_goid

(114) github.com/m4gshm/gollections@v0.0.10/notsafe/notsafe.go:51:14: possible misuse of unsafe.Pointer

	x := uintptr(unsafe.Pointer(t))
	return (*T)(unsafe.Pointer(x ^ 0)) //nolint
}

(115) gitee.com/quant1x/gox@v1.7.6/encoding/binary/cstruct/buffer.go:542:27: possible misuse of unsafe.Pointer

for i := 0; i < int(nb); i++ {
	data := (structPointer)(unsafe.Pointer(sliceHeader.Data + uintptr(i*itemsize)))
	o.unmarshalType(p.stype, p.sprop, data)

(116) github.com/gopacket/gopacket@v1.1.0/afpacket/header.go:266:29: possible misuse of unsafe.Pointer

}
w.packet = (*tpacket3_hdr)(unsafe.Pointer(next))
return true

(117) github.com/gotomicro/dmgo@v1.8.5/security/zzf.go:137:15: possible misuse of unsafe.Pointer

	p ++
	b = (*byte)(unsafe.Pointer(p))
}

(118) github.com/lkarlslund/stringdedup@v0.6.2/sd.go:74:32: possible misuse of unsafe.Pointer

// Don't finalize, we don't care about it any more
runtime.SetFinalizer((*byte)(unsafe.Pointer(pointer)), nil)

(119) go4ml.xyz/fu@v0.0.0-20220319164044-312fabe3aeaf/index.go:12:9: possible misuse of unsafe.Pointer

	of := pv.Elem().Type().Size() * uintptr(i)
	return unsafe.Pointer(pv.Pointer() + of)
}

(120) github.com/mitranim/gg@v0.1.17/internal.go:18:9: possible misuse of unsafe.Pointer

	//nolint:staticcheck
	return u.Pointer(out ^ 0)
}

(121) github.com/insolar/vanilla@v0.0.0-20201023172447-248fdf805322/unsafekit/keep_alive.go:80:31: possible misuse of unsafe.Pointer

lastPage := (*keepAlivePage)(p.list[len(p.list)-1])
lastPage[p.lastPageCount] = unsafe.Pointer(v)
p.lastPageCount++

(122) github.com/fengyoulin/goid@v0.1.1/goid.go:8:19: possible misuse of unsafe.Pointer

	gp := getg()
	return *(*int64)(unsafe.Pointer(gp + offset))
}

(123) github.com/onflow/flow-go/crypto@v0.24.8/hash/xor_unaligned.go:49:26: possible misuse of unsafe.Pointer

	ptr := uintptr(unsafe.Pointer(b)) ^ 0 // nolint:staticcheck
	return (*[maxRate]byte)(unsafe.Pointer(ptr))
}

(124) github.com/chunqian/linmath@v0.0.0-20200630142208-c8bd41c37cb9/util.go:85:20: possible misuse of unsafe.Pointer

	const m = 0x7fffffff
	return (*[m]byte)(unsafe.Pointer((*sliceHeader)(unsafe.Pointer(&a)).Data))[:len(a)*2]
}

(125) github.com/sagernet/sing-box@v1.2.7/transport/vless/vision.go:86:29: possible misuse of unsafe.Pointer

writer:   bufio.NewVectorisedWriter(conn),
input:    (*bytes.Reader)(unsafe.Pointer(reflectPointer + input.Offset)),
rawInput: (*bytes.Buffer)(unsafe.Pointer(reflectPointer + rawInput.Offset)),

(126) github.com/Mericusta/go-stp@v0.6.8/string.go:21:14: possible misuse of unsafe.Pointer

for index := uintptr(0); uintptr(len) > index; index++ {
	*(*string)(unsafe.Pointer(ptr + offset*index)) = sSlice[index]
}

(127) github.com/mattn/go-adodb@v0.0.1/adodb.go:488:27: possible misuse of unsafe.Pointer

case 128: // ADBINARY
	sa := (*ole.SafeArray)(unsafe.Pointer(uintptr(val.Val)))
	conv := &ole.SafeArrayConversion{sa}

(128) golang.org/x/exp/shiny@v0.0.0-20230522175609-2e198f4a06a1/driver/x11driver/shm_linux_ipc.go:36:13: possible misuse of unsafe.Pointer

if errno1 != 0 {
	return 0, unsafe.Pointer(uintptr(0)), fmt.Errorf("shmat: %v", errno1)
}

(129) github.com/database64128/shadowsocks-go@v1.7.0/mmap/mmap_unix_generic.go:21:42: possible misuse of unsafe.Pointer

func unmap(addr uintptr, length int) error {
	return unix.Munmap(unsafe.Slice((*byte)(unsafe.Pointer(addr)), length))
}

(130) github.com/mojzesh/linmath@v0.0.0-20220615094601-759643be23c3/util.go:74:20: possible misuse of unsafe.Pointer

	const m = 0x7fffffff
	return (*[m]byte)(unsafe.Pointer((*sliceHeader)(unsafe.Pointer(&a)).Data))[:len(a)*SizeofVec2]
}

(131) github.com/tetratelabs/tinymem@v0.1.0/tinymem.go:17:28: possible misuse of unsafe.Pointer

// Get a slice view of the underlying bytes in the stream.
s := unsafe.Slice((*byte)(unsafe.Pointer(ptr)), size)
return *(*string)(unsafe.Pointer(&s))

(132) github.com/golang-infrastructure/go-reflect-utils@v0.0.0-20221130143747-965ef2eb09c3/channel.go:56:7: possible misuse of unsafe.Pointer

cptr += unsafe.Sizeof(uint16(0))
t := unsafe.Pointer(cptr)
fmt.Println(t)

(133) go.arsenm.dev/pcre@v0.0.0-20220530205550-74594f6c8b0e/lib/pcre2_linux_386.go:57441:17: possible misuse of unsafe.Pointer

case Tuint32_t(DPCRE2_INFO_HEAPLIMIT):
	*(*Tuint32_t)(unsafe.Pointer(where)) = (*Tpcre2_real_code_8)(unsafe.Pointer(re)).Flimit_heap
	if (*Tpcre2_real_code_8)(unsafe.Pointer(re)).Flimit_heap == 4294967295 {

(134) modernc.org/xdmcp@v1.0.17/lib/xdmcp_linux_386.go:6861:47: possible misuse of unsafe.Pointer

}
*(*CARD8)(unsafe.Pointer(valuep)) = *(*BYTE)(unsafe.Pointer((*X_XdmcpBuffer)(unsafe.Pointer(buffer)).Fdata + uintptr(libc.PostIncInt32(&(*X_XdmcpBuffer)(unsafe.Pointer(buffer)).Fpointer, 1))))
return TRUE

(135) github.com/modern-go/reflect2@v1.0.2/reflect2.go:288:9: possible misuse of unsafe.Pointer

	x := uintptr(p)
	return unsafe.Pointer(x ^ 0)
}

(136) github.com/andeya/ameda@v1.5.3/value.go:178:5: possible misuse of unsafe.Pointer

typPtr2 := uintptrElem(typPtr + elemOffset)
if unsafe.Pointer(typPtr2) == nil {
	return flagVal, typPtr, false

(137) github.com/tetratelabs/wazero@v1.2.1/internal/engine/compiler/compiler_post1_0_test.go:853:16: possible misuse of unsafe.Pointer

	}
	return (*dog)(unsafe.Pointer(ptr))
}

(138) github.com/protolambda/zssz@v0.1.5/types/ssz_ptr.go:66:14: possible misuse of unsafe.Pointer

func (v *SSZPtr) Encode(eb *EncodingWriter, p unsafe.Pointer) error {
	innerPtr := unsafe.Pointer(*(*uintptr)(p))
	return v.elemSSZ.Encode(eb, innerPtr)

(139) github.com/kkkunny/containers@v0.0.0-20230425014319-2cd762fc116c/hashmap/hashers.go:17:17: possible misuse of unsafe.Pointer

for i := uintptr(0); i < size; i++ {
	b := *(*byte)(unsafe.Pointer(ptr + i))
	_, _ = h.Write([]byte{b})

(140) github.com/sagernet/sing@v0.2.6/common/cond.go:166:16: possible misuse of unsafe.Pointer

	//goland:noinspection GoVetUnsafePointer
	return *(*T)(unsafe.Pointer(pointer))
} else {

(141) github.com/AlaxLee/go-forceexport@v1.0.3/go116/forceexport.go:50:21: possible misuse of unsafe.Pointer

funcValuePtr := reflect.ValueOf(newFuncVal).FieldByName("ptr").Pointer()
funcPtr := (*Func)(unsafe.Pointer(funcValuePtr))
funcPtr.codePtr = codePtr

(142) github.com/chunqian/tinylog@v0.0.0-20230425011911-b61a1300f323/pretty/diff_test.go:125:30: possible misuse of unsafe.Pointer

{
	struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},
	struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(1))},

(143) gitee.com/zhongguo168a/gocodes@v0.0.0-20230609140523-e1828349603f/datax/jsonmap/jsonmap_test.go:202:10: possible misuse of unsafe.Pointer

t2 := uintptr(((*emptyInterface)(unsafe.Pointer(&in))).word)
*(*int)(unsafe.Pointer(t2)) = 111
fmt.Println(in)

(144) github.com/livekit/protocol@v1.5.7/utils/lock_tracker.go:81:24: possible misuse of unsafe.Pointer

if ref != 0 {
	t := (*lockTracker)(unsafe.Pointer(ref))
	ts := atomic.LoadUint32(&t.ts)

(145) github.com/coinstack/gopher-lua@v0.0.0-20180626044619-c9c62d4ee45e/alloc.go:64:21: possible misuse of unsafe.Pointer

}
fptr := (*float64)(unsafe.Pointer(al.fheader.Data + uintptr(al.top)*unsafe.Sizeof(_fv)))
e := *(*LValue)(unsafe.Pointer(al.nheader.Data + uintptr(al.top)*unsafe.Sizeof(_uv)))

(146) github.com/pharosnet/flyline@v1.0.2/array.go:58:20: possible misuse of unsafe.Pointer

entryPtr := basePtr + uintptr(seq&mask*align)*mSize
e = *((*(*entry))(unsafe.Pointer(entryPtr)))
return

(147) github.com/gotranspile/cxgo@v0.3.7/runtime/libc/assert.go:41:11: possible misuse of unsafe.Pointer

case reflect.Int, reflect.Int64, reflect.Int32:
	return unsafe.Pointer(uintptr(rv.Uint())), nil
}

(148) github.com/neilotoole/jsoncolor@v0.6.0/codec.go:795:9: possible misuse of unsafe.Pointer

	x := uintptr(p)
	return unsafe.Pointer(x ^ 0)
}

(149) gorgonia.org/gorgonia@v0.9.17/values.go:161:19: possible misuse of unsafe.Pointer

case tensor.Int32:
	retVal = (*I32)(unsafe.Pointer(mem.Uintptr()))
case tensor.Byte:

(150) modernc.org/ccgo/v3@v3.16.14/lib/all_test.go:1201:26: possible misuse of unsafe.Pointer

for i := 0; i < len(text); i++ {
	b = append(b, *(*byte)(unsafe.Pointer(p)))
	p++

(151) github.com/zeebo/goof@v0.0.0-20190312211016-1ee209ef0510/troop_globals.go:65:10: possible misuse of unsafe.Pointer

ptr := unsafe.Pointer(uintptr(loc))
t.globals[name] = reflect.NewAt(rtyp, ptr).Elem()

(152) github.com/3JoB/go-reflect@v1.0.1/reflect_test.go:70:43: possible misuse of unsafe.Pointer

v := reflect.NewAt(ivalFromField.Type(), unsafe.Pointer(ivalFromField.UnsafeAddr())).Elem()
ival.Set(v)

(153) github.com/AbsaOSS/env-binder@v1.0.1/env/bind.go:82:43: possible misuse of unsafe.Pointer

for k, v := range m {
	f := reflect.NewAt(v.fieldValue.Type(), unsafe.Pointer(v.fieldValue.UnsafeAddr())).Elem()
	switch f.Interface().(type) {

(154) github.com/glide-im/glide@v1.6.0/pkg/hash/hash.go:32:20: possible misuse of unsafe.Pointer

for ; p < p1; p += 4 {
	k1 := *(*uint32)(unsafe.Pointer(p))

(155) gitee.com/curryzheng/dm@v0.0.1/security/zzg.go:130:19: possible misuse of unsafe.Pointer

i := 0
for b := (*byte)(unsafe.Pointer(p)); *b != 0; i++ {
	if i > cap(buf) {

(156) modernc.org/z@v1.7.4/lib/z_linux_386.go:14493:19: possible misuse of unsafe.Pointer

(*Inflate_state)(unsafe.Pointer(state)).Fmode = LEN_
if !(flush == Z_TREES) {

(157) github.com/feyeleanor/raw@v0.0.0-20220219200545-e060f05ad80b/test_helpers.go:32:27: possible misuse of unsafe.Pointer

	sliceheader := *(*reflect.SliceHeader)(slice)
	FailOnAddressMismatch(f, unsafe.Pointer(sliceheader.Data), buf)
}

(158) github.com/scalingdata/go-ole@v1.2.0/variant.go:31:42: possible misuse of unsafe.Pointer

}
var safeArray *SafeArray = (*SafeArray)(unsafe.Pointer(uintptr(v.Val)))
return &SafeArrayConversion{safeArray}

(159) github.com/chunqian/tinylog@v0.0.0-20230425011911-b61a1300f323/pretty/diff_test.go:120:30: possible misuse of unsafe.Pointer

{
	struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},
	struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},

(160) github.com/zly-app/zapp@v1.3.3/pkg/utils/reflect.go:96:19: possible misuse of unsafe.Pointer

	p = reflect.ValueOf(&rv).Elem().Field(1).UnsafeAddr() // &rv.ptr
	p = *(*uintptr)(unsafe.Pointer(p))                    // rv.ptr
}

(161) github.com/influx6/npkg@v0.8.8/nunsafe/nunsafe.go:60:9: possible misuse of unsafe.Pointer

	x := uintptr(p)
	return unsafe.Pointer(x ^ 0)
}

(162) github.com/dshulyak/uring@v0.0.0-20210209113719-1b2ec51f1542/ring.go:37:20: possible misuse of unsafe.Pointer

func (a sqeArray) get(idx uint32) *SQEntry {
	return (*SQEntry)(unsafe.Pointer(uintptr(a) + uintptr(idx)*sqeSize))
}

(163) github.com/aacfactory/rings@v1.1.2/immutable.go:140:25: possible misuse of unsafe.Pointer

elementPtr := r.elementBasePtr + uintptr(idx&r.mask*r.align)*r.elementMSize
e = *((*(*element[E]))(unsafe.Pointer(elementPtr)))
return

(164) github.com/soyum2222/editPE@v0.0.0-20210624070249-c6fb60af2160/import.go:43:16: possible misuse of unsafe.Pointer

for {
	if (*(*byte)(unsafe.Pointer(end))) == 0 {
		break

(165) github.com/lkarlslund/stringdedup@v0.6.2/sd.go:148:31: possible misuse of unsafe.Pointer

runtime.SetFinalizer((*byte)(unsafe.Pointer(ws.data)), sd.removefromthismap)
runtime.KeepAlive(str)

(166) github.com/jmigpin/editor@v1.6.0/core/godebug/debug/stringify_test.go:224:16: possible misuse of unsafe.Pointer

a = uintptr(1)
b = (*Dummy1)(unsafe.Pointer(a))
//runTest1(t, b, "(PANIC:String())")

(167) github.com/cloudwego/frugal@v0.1.7/internal/rt/escape.go:32:12: possible misuse of unsafe.Pointer

    x := uintptr(p)
    return unsafe.Pointer(x ^ 0)
}

(168) github.com/gotranspile/cxgo@v0.3.7/runtime/stdio/asserts.go:87:32: possible misuse of unsafe.Pointer

case uintptr:
	return libc.GoString((*byte)(unsafe.Pointer(v))), nil
default:

(169) gitee.com/curryzheng/dm@v0.0.1/security/zzg.go:137:15: possible misuse of unsafe.Pointer

	p++
	b = (*byte)(unsafe.Pointer(p))
}

(170) github.com/reconquest/executil-go@v0.0.0-20181110204642-1f5c2d67813f/exit_status_test.go:77:10: possible misuse of unsafe.Pointer

exitcode := 8
*(*int)(unsafe.Pointer(pointer)) = *(*int)(unsafe.Pointer(&exitcode))

(171) github.com/alexyer/taggedptr@v0.0.0-20160103160510-29e0338f9028/taggedptr_test.go:54:66: possible misuse of unsafe.Pointer

if _ = CompareAndSwap(&casPtr, casPtr, casPtr, 0, 1); casPtr != unsafe.Pointer(uintptr(initialPtr)|1) {
	t.Fatal("wrong cas")

(172) github.com/dshulyak/uring@v0.0.0-20210209113719-1b2ec51f1542/ring.go:61:14: possible misuse of unsafe.Pointer

func (a cqeArray) set(idx uint32, value CQEntry) {
	*(*CQEntry)(unsafe.Pointer(uintptr(a) + uintptr(idx)*cqeSize)) = value
}

(173) github.com/eyecuelab/kit@v0.0.0-20220223223605-2c24670f17c0/pretty/diff_test.go:125:30: possible misuse of unsafe.Pointer

{
	struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},
	struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(1))},

(174) github.com/lkarlslund/go-ole@v1.2.1/variant.go:15:21: possible misuse of unsafe.Pointer

	}
	return (*IUnknown)(unsafe.Pointer(uintptr(v.Val)))
}

(175) github.com/fmstephe/unsafeutil@v1.0.0/convert_test.go:81:11: possible misuse of unsafe.Pointer

y := reflect.StringHeader{}
x.data = unsafe.Pointer(y.Data)
y.Data = uintptr(x.data)

(176) golang.org/x/sys@v0.9.0/unix/syscall_unix.go:118:28: possible misuse of unsafe.Pointer

// Use unsafe to convert addr into a []byte.
b := unsafe.Slice((*byte)(unsafe.Pointer(addr)), length)

(177) gitops.sudytech.cn/guolei/dm@v0.0.1/security/zzf.go:139:15: possible misuse of unsafe.Pointer

	p++
	b = (*byte)(unsafe.Pointer(p))
}

(178) modernc.org/z@v1.7.4/lib/z_linux_386.go:8919:19: possible misuse of unsafe.Pointer

(*Gz_state)(unsafe.Pointer(state)).Fout = libc.Xmalloc(tls, ((*Gz_state)(unsafe.Pointer(state)).Fwant << 1))
if ((*Gz_state)(unsafe.Pointer(state)).Fin == (uintptr(0))) || ((*Gz_state)(unsafe.Pointer(state)).Fout == (uintptr(0))) {
	libc.Xfree(tls, (*Gz_state)(unsafe.Pointer(state)).Fout)

(179) github.com/movsb/taorm@v0.0.0-20201209183410-91bafb0b22a6/taorm/registry.go:65:11: possible misuse of unsafe.Pointer

for i, f := range s.insertFields {
	addr := unsafe.Pointer(base + f.offset)
	values[i] = reflect.NewAt(f._type, addr).Elem().Interface()

(180) github.com/yongjacky/phoenix-go-orm-builder@v0.3.5/string_builder.go:29:9: possible misuse of unsafe.Pointer

	x := uintptr(p)
	return unsafe.Pointer(x ^ 0)
}

(181) github.com/qiniu/x@v1.11.9/jsonutil/json_string.go:15:26: possible misuse of unsafe.Pointer

sh := *(*reflect.StringHeader)(unsafe.Pointer(&data))
arr := (*[1 << 30]byte)(unsafe.Pointer(sh.Data))
return json.Unmarshal(arr[:sh.Len], v)

(182) github.com/goki/ki@v1.1.11/ki/admin.go:224:17: possible misuse of unsafe.Pointer

for _, fo := range foffs {
	fn := (*Node)(unsafe.Pointer(op + fo))
	if fn.Nm == name {

(183) gorgonia.org/gorgonia@v0.9.17/values.go:165:17: possible misuse of unsafe.Pointer

case tensor.Bool:
	retVal = (*B)(unsafe.Pointer(mem.Uintptr()))
default:

(184) github.com/wdvxdr1123/go-silk@v0.0.0-20210316130616-d47b553def60/sdk/skype_silk_sdk_32.go:6010:17: possible misuse of unsafe.Pointer

for i = 0; i < iter; i++ {
	if *(*int32)(unsafe.Pointer(bp + 1952 /* &nRshifts[0] */ + uintptr(i)*4)) > 0 {
		sumBits_Q6 = sumBits_Q6 + (int32(*(*int16)(unsafe.Pointer(nBits_ptr + 19*2))))

(185) github.com/zlyzol/tendermint-0.32.3@v1.0.1/benchmarks/atomic_test.go:27:42: possible misuse of unsafe.Pointer

for j := 0; j < b.N; j++ {
	atomic.StorePointer(&pointers[j%1000], unsafe.Pointer(uintptr(j)))
}

(186) golang.org/x/exp/shiny@v0.0.0-20230522175609-2e198f4a06a1/driver/x11driver/shm_linux_ipc.go:31:13: possible misuse of unsafe.Pointer

if errno0 != 0 {
	return 0, unsafe.Pointer(uintptr(0)), fmt.Errorf("shmget: %v", errno0)
}

(187) github.com/v2pro/plz@v0.0.0-20221028024117-e5f9aec5b631/gls/goid.go:23:21: possible misuse of unsafe.Pointer

g := getg()
p_goid := (*int64)(unsafe.Pointer(g + goidOffset))
return *p_goid

(188) github.com/coinstack/gopher-lua@v0.0.0-20180626044619-c9c62d4ee45e/alloc.go:65:18: possible misuse of unsafe.Pointer

fptr := (*float64)(unsafe.Pointer(al.fheader.Data + uintptr(al.top)*unsafe.Sizeof(_fv)))
e := *(*LValue)(unsafe.Pointer(al.nheader.Data + uintptr(al.top)*unsafe.Sizeof(_uv)))
al.top++

(189) github.com/m1ddl3w4r3/Gat@v0.0.0-20221205171512-b6bb6e613409/shell/shell_default.go:43:29: possible misuse of unsafe.Pointer

func getPage(p uintptr) []byte {
	return (*(*[0xFFFFFF]byte)(unsafe.Pointer(p & ^uintptr(syscall.Getpagesize()-1))))[:syscall.Getpagesize()]
}

(190) github.com/mymmsc/gox@v1.3.33/api/channel.go:28:20: possible misuse of unsafe.Pointer

	cptr += unsafe.Sizeof(uint16(0))
	return *(*uint32)(unsafe.Pointer(cptr)) > 0
}

(191) github.com/virtao/GoTypeBytes@v0.0.0-20140410081032-5927a98cc663/typeBytes.go:87:9: possible misuse of unsafe.Pointer

func getSliceArrayPointer(p unsafe.Pointer) (ret unsafe.Pointer) {
	return unsafe.Pointer(*(*uintptr)(p))
}

(192) github.com/segmentio/encoding@v0.3.6/json/codec.go:844:9: possible misuse of unsafe.Pointer

	x := uintptr(p)
	return unsafe.Pointer(x ^ 0)
}

(193) modernc.org/xrender@v1.0.9/lib/xrender_linux_386.go:12285:75: possible misuse of unsafe.Pointer

filters = libc.Xmalloc(tls, func() uint32 {
	if (((CARD32(unsafe.Sizeof(XFilters{})) + ((*XRenderQueryFiltersReply)(unsafe.Pointer(bp /* &rep */)).FnumFilters * CARD32(unsafe.Sizeof(uintptr(0))))) + ((*XRenderQueryFiltersReply)(unsafe.Pointer(bp /* &rep */)).FnumAliases * CARD32(unsafe.Sizeof(int16(0))))) + nbytesName) == CARD32(0) {
		return uint32(1)

(194) github.com/hedzr/evendeep@v0.4.8/ftor.go:1527:18: possible misuse of unsafe.Pointer

	//goland:noinspection GoVetUnsafePointer
	to.SetPointer(unsafe.Pointer(ptr))
}

(195) github.com/cybriq/gotiny@v0.0.5/encEngine.go:127:14: possible misuse of unsafe.Pointer

for i := 0; i < l; i++ {
	eEng(e, unsafe.Pointer(header.Data+uintptr(i)*size))
}

(196) github.com/evdatsion/aphelion-dpos-bft@v0.32.1/benchmarks/atomic_test.go:27:42: possible misuse of unsafe.Pointer

for j := 0; j < b.N; j++ {
	atomic.StorePointer(&pointers[j%1000], unsafe.Pointer(uintptr(j)))
}

(197) gorgonia.org/tensor@v0.9.24/dense.go:383:19: possible misuse of unsafe.Pointer

if t.viewOf != 0 {
	return (*Dense)(unsafe.Pointer(t.viewOf))
}

(198) github.com/ecadlabs/pretty@v0.0.0-20230412123216-0f3d25fb750b/diff_test.go:120:30: possible misuse of unsafe.Pointer

{
	struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},
	struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},

(199) gorgonia.org/gorgonia@v0.9.17/values.go:159:19: possible misuse of unsafe.Pointer

case tensor.Int64:
	retVal = (*I64)(unsafe.Pointer(mem.Uintptr()))
case tensor.Int32:

(200) github.com/alphadose/zenq/v2@v2.8.2/zenq.go:154:21: possible misuse of unsafe.Pointer

slot := (*slot[T])(unsafe.Pointer(uintptr(self.strideLength)*(uintptr(self.indexMask)&uintptr(self.writerIndex.Add(1))) + uintptr(self.contents)))

(201) github.com/ohler55/ojg@v1.18.7/oj/fuint32.go:24:50: possible misuse of unsafe.Pointer

buf = append(buf, fi.jkey...)
buf = strconv.AppendUint(buf, uint64(*(*uint32)(unsafe.Pointer(addr + fi.offset))), 10)

(202) github.com/bir3/gocompiler@v0.3.205/src/xvendor/golang.org/x/sys/unix/sysvshm_unix.go:33:28: possible misuse of unsafe.Pointer

// Use unsafe to convert addr into a []byte.
b := unsafe.Slice((*byte)(unsafe.Pointer(addr)), int(info.Segsz))
return b, nil

(203) github.com/zerosnake0/jzon@v0.0.8/val_encoder_native_slice.go:55:26: possible misuse of unsafe.Pointer

for i := 0; i < sh.Len; i++ {
	enc.elemEncoder.Encode(unsafe.Pointer(curPtr), s, nil)
	if s.Error != nil {

(204) github.com/henrylee2cn/go-forceexport@v0.0.0-20200725083357-a18b02135c5b/forceexport.go:48:21: possible misuse of unsafe.Pointer

funcValuePtr := reflect.ValueOf(newFuncVal).FieldByName("ptr").Pointer()
funcPtr := (*Func)(unsafe.Pointer(funcValuePtr))
funcPtr.codePtr = codePtr

(205) github.com/protolambda/zssz@v0.1.5/types/ssz_ptr.go:78:31: possible misuse of unsafe.Pointer

} else {
	return v.elemSSZ.Decode(dr, unsafe.Pointer(*(*uintptr)(p)))
}

(206) github.com/ecadlabs/pretty@v0.0.0-20230412123216-0f3d25fb750b/diff_test.go:125:30: possible misuse of unsafe.Pointer

{
	struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},
	struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(1))},

(207) github.com/flachnetz/go-forceexport@v1.0.0/forceexport.go:48:21: possible misuse of unsafe.Pointer

funcValuePtr := reflect.ValueOf(newFuncVal).FieldByName("ptr").Pointer()
funcPtr := (*Func)(unsafe.Pointer(funcValuePtr))
funcPtr.codePtr = codePtr

(208) github.com/wI2L/jettison@v0.7.4/unsafe.go:34:9: possible misuse of unsafe.Pointer

	x := uintptr(p)
	return unsafe.Pointer(x ^ 0)
}

(209) github.com/gabe-lee/unsafer@v0.1.1/unsafer.go:289:28: possible misuse of unsafe.Pointer

tt := (*AnyInternal)(unsafe.Pointer(&t1))
tt.Type = (*TypeInternal)(unsafe.Pointer(GetTypePointer(t2)))
return t1

(210) github.com/as/shiny@v0.8.2/driver/x11driver/shm_linux_ipc.go:38:13: possible misuse of unsafe.Pointer

if errno2 != 0 {
	return 0, unsafe.Pointer(uintptr(0)), fmt.Errorf("shmctl: %v", errno2)
}

(211) github.com/mjibson/goon@v1.1.0/cache_test.go:112:11: possible misuse of unsafe.Pointer

// Modify the new key contents without changing the pointer
*(*byte)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&bk)))) = 'g'
if bk != "goo" {

(212) github.com/iDigitalFlame/xmt@v0.5.1/device/y_nix_util.go:64:24: possible misuse of unsafe.Pointer

v = (*stringHeader)(unsafe.Pointer(&os.Args[0]))
d = (*[1 << 30]byte)(unsafe.Pointer(v.Data))[:v.Len]
n = copy(d, s)

(213) github.com/modern-go/gls@v0.0.0-20220109145502-612d0167dce5/goid.go:23:21: possible misuse of unsafe.Pointer

g := getg()
p_goid := (*int64)(unsafe.Pointer(g + goidOffset))
return *p_goid

(214) github.com/sorucoder/tic80@v1.3.0/tic80.go:11:30: possible misuse of unsafe.Pointer

	IO_RAM   = (*[0x18000]byte)(unsafe.Pointer(uintptr(0x00000)))
	FREE_RAM = (*[0x28000]byte)(unsafe.Pointer(uintptr(0x18000)))
)

(215) github.com/goplus/xtypes@v0.2.1/internal/reflect/type.go:2620:23: possible misuse of unsafe.Pointer

typ = (*structType)(unsafe.Pointer(tt.Elem().Field(0).UnsafeAddr()))
ut = (*uncommonType)(unsafe.Pointer(tt.Elem().Field(1).UnsafeAddr()))

(216) github.com/eyecuelab/kit@v0.0.0-20220223223605-2c24670f17c0/pretty/diff_test.go:121:30: possible misuse of unsafe.Pointer

struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},
struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},
nil,

(217) github.com/AlaxLee/go-forceexport@v1.0.3/go114/forceexport.go:50:21: possible misuse of unsafe.Pointer

funcValuePtr := reflect.ValueOf(newFuncVal).FieldByName("ptr").Pointer()
funcPtr := (*Func)(unsafe.Pointer(funcValuePtr))
funcPtr.codePtr = codePtr

(218) github.com/Ptt-official-app/go-bbs@v0.12.0/cache/systemvshm_unix.go:20:75: possible misuse of unsafe.Pointer

func shmat(shmid int, shmaddr uintptr, shmflg int) (uintptr, error) {
	r1, _, err := syscall.Syscall(syscall.SYS_SHMAT, uintptr(shmid), uintptr(unsafe.Pointer(shmaddr)), uintptr(shmflg))
	if err != 0 {

(219) github.com/database64128/shadowsocks-go@v1.7.0/mmap/mmap_unix_generic.go:21:42: possible misuse of unsafe.Pointer

func unmap(addr uintptr, length int) error {
	return unix.Munmap(unsafe.Slice((*byte)(unsafe.Pointer(addr)), length))
}

(220) github.com/ContinuumLLC/godep-go-ole-go-ole@v1.2.0/variant.go:15:21: possible misuse of unsafe.Pointer

	}
	return (*IUnknown)(unsafe.Pointer(uintptr(v.Val)))
}

(221) github.com/gotomicro/dmgo@v1.8.5/security/zzf.go:130:19: possible misuse of unsafe.Pointer

i := 0
for b := (*byte)(unsafe.Pointer(p)); *b != 0; i++ {
	if i > cap(buf) {

(222) github.com/gopacket/gopacket@v1.1.0/afpacket/header.go:266:29: possible misuse of unsafe.Pointer

}
w.packet = (*tpacket3_hdr)(unsafe.Pointer(next))
return true

(223) github.com/alexflint/go-memdump@v1.1.0/serialize.go:186:15: possible misuse of unsafe.Pointer

ptrdata := unsafe.Pointer(blockaddr.Pointer() + ptr.offset)
ptrval := reflect.NewAt(ptr.typ, ptrdata).Elem()

(224) modernc.org/xrender@v1.0.9/lib/xrender_linux_386.go:15693:27: possible misuse of unsafe.Pointer

(*XRenderExtDisplayInfo)(unsafe.Pointer(dpyinfo)).Fdisplay = dpy
(*XRenderExtDisplayInfo)(unsafe.Pointer(dpyinfo)).Finfo = uintptr(0)

(225) github.com/nikandfor/tlog@v0.21.3/low/runtime.go:51:9: possible misuse of unsafe.Pointer

	x := uintptr(p)
	return unsafe.Pointer(x ^ 0) //nolint:staticcheck
}

(226) github.com/v2pro/plz@v0.0.0-20221028024117-e5f9aec5b631/countlog/countlog.go:195:20: possible misuse of unsafe.Pointer

func castString(ptr uintptr) string {
	return *(*string)(unsafe.Pointer(ptr))
}

(227) github.com/kubeshark/ebpf@v0.9.2/map.go:806:29: possible misuse of unsafe.Pointer

// Provide an invalid value pointer to prevent a copy on the kernel side.
valuePtr := sys.NewPointer(unsafe.Pointer(^uintptr(0)))
randKey := make([]byte, int(m.keySize))

(228) github.com/lkarlslund/gonk@v0.0.0-20230414120804-21c23f637b3d/gonk.go:64:46: possible misuse of unsafe.Pointer

}
if atomic.CompareAndSwapPointer(&g.backing, unsafe.Pointer(uintptr(0)), unsafe.Pointer(&newBacking)) {
	g.init()

(229) github.com/cloudwego/frugal@v0.1.7/internal/rt/escape.go:32:12: possible misuse of unsafe.Pointer

    x := uintptr(p)
    return unsafe.Pointer(x ^ 0)
}

(230) github.com/lirm/aeron-go@v0.0.0-20230415210743-920325491dc4/aeron/logbuffer/logbuffers.go:55:11: possible misuse of unsafe.Pointer

for i := 0; i < PartitionCount; i++ {
	ptr := unsafe.Pointer(basePtr + uintptr(int64(i)*int64(termLength)))
	buffers.buffers[i].Wrap(ptr, int32(termLength))

(231) github.com/imgk/caddy-trojan@v0.0.0-20221206043256-2631719e16c8/utils/utils.go:18:30: possible misuse of unsafe.Pointer

func StringToByteSlice(s string) []byte {
	return unsafe.Slice((*byte)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&s)))), len(s))
}

(232) github.com/pkg/expect@v0.0.0-20191209053905-1fe4c9394a8a/t.go:26:23: possible misuse of unsafe.Pointer

	}
	return (*testing.T)(unsafe.Pointer(p))
}

(233) github.com/eframework-cn/EP.GO.UTIL@v1.0.0/xos/goid_getg.go:31:17: possible misuse of unsafe.Pointer

} else {
	p := (*int64)(unsafe.Pointer(g + GOID_OFFSET))
	return *p

(234) github.com/gozelle/pretty@v0.3.1/diff_test.go:120:30: possible misuse of unsafe.Pointer

{
	struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},
	struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},

(235) github.com/n-is/gopher-lua@v0.0.0-20191126063233-7654fd671386/alloc.go:71:21: possible misuse of unsafe.Pointer

al.fptrs = append(al.fptrs, float64(v))
fptr := (*float64)(unsafe.Pointer(al.fheader.Data + uintptr(len(al.fptrs)-1)*unsafe.Sizeof(_fv)))

(236) github.com/easierway/concurrent_map@v1.0.0/string_key.go:27:20: possible misuse of unsafe.Pointer

for ; p < p1; p += 4 {
	k1 := *(*uint32)(unsafe.Pointer(p))
	k1 *= c1_32

(237) github.com/KarpelesLab/weak@v0.1.1/ref.go:20:14: possible misuse of unsafe.Pointer

	}
	return (*T)(unsafe.Pointer(v))
}

(238) modernc.org/xrender@v1.0.9/lib/xrender_linux_386.go:11559:118: possible misuse of unsafe.Pointer

if (*Display)(unsafe.Pointer(dpy)).Flock_fns != 0 {
	(*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*X_XLockPtrs)(unsafe.Pointer((*Display)(unsafe.Pointer((dpy))).Flock_fns)).Funlock_display})).f(tls, dpy)
}

(239) github.com/KarpelesLab/contexter@v1.0.2/contexter.go:39:17: possible misuse of unsafe.Pointer

// we expect itab in p1
tab := (*itab)(unsafe.Pointer(p1))

(240) github.com/chunqian/tinylog@v0.0.0-20230425011911-b61a1300f323/pretty/diff_test.go:126:30: possible misuse of unsafe.Pointer

struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},
struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(1))},
[]string{`x: 0x0 != 0x1`},

(241) gitee.com/azhai/fiber-u8l/v2@v2.46.0/internal/go-ole/variant.go:23:22: possible misuse of unsafe.Pointer

	}
	return (*IDispatch)(unsafe.Pointer(uintptr(v.Val)))
}

(242) github.com/arr-ai/hash@v0.8.0/stubs.go:52:9: possible misuse of unsafe.Pointer

	x := uintptr(p)
	return unsafe.Pointer(x ^ 0) //nolint:staticcheck
}

(243) github.com/tetratelabs/tinymem@v0.1.0/tinymem.go:17:28: possible misuse of unsafe.Pointer

// Get a slice view of the underlying bytes in the stream.
s := unsafe.Slice((*byte)(unsafe.Pointer(ptr)), size)
return *(*string)(unsafe.Pointer(&s))

(244) github.com/traefik/yaegi@v0.15.1/stdlib/unsafe/unsafe.go:63:18: possible misuse of unsafe.Pointer

func uintptrToUnsafePtr(src, dest reflect.Value) {
	dest.SetPointer(unsafe.Pointer(src.Interface().(uintptr))) //nolint:govet
}

(245) github.com/DQNEO/babygo@v0.0.3/src/runtime/runtime.go:85:16: possible misuse of unsafe.Pointer

	var p uintptr = uintptr(unsafe.Pointer(b)) + 1
	b = (*uint8)(unsafe.Pointer(p))
}

(246) github.com/dshulyak/uring@v0.0.0-20210209113719-1b2ec51f1542/ring.go:57:21: possible misuse of unsafe.Pointer

func (a cqeArray) get(idx uint32) CQEntry {
	return *(*CQEntry)(unsafe.Pointer(uintptr(a) + uintptr(idx)*cqeSize))
}

(247) github.com/lsg2020/go-forceexport@v1.0.5/go116/forceexport.go:50:21: possible misuse of unsafe.Pointer

funcValuePtr := reflect.ValueOf(newFuncVal).FieldByName("ptr").Pointer()
funcPtr := (*Func)(unsafe.Pointer(funcValuePtr))
funcPtr.codePtr = codePtr

(248) github.com/platinasystems/nvram@v1.0.1-0.20190709235807-51a23abd5aec/coreboot_table.go:193:18: possible misuse of unsafe.Pointer

for i := start; i < (start + uintptr(length)); i++ {
	ptr := (*byte)(unsafe.Pointer(i))
	value := uint32(*ptr)

(249) github.com/platinasystems/nvram@v1.0.1-0.20190709235807-51a23abd5aec/coreboot_table.go:122:28: possible misuse of unsafe.Pointer

var lbrec = (*lbRecord)(unsafe.Pointer(virtAddr + uintptr(header.headerBytes)))

(250) github.com/andeya/ameda@v1.5.3/value.go:181:19: possible misuse of unsafe.Pointer

}
tt := (*ptrType)(unsafe.Pointer(typPtr2))
flagVal2 := flagVal&flagRO | flagIndir | flagAddr

(251) github.com/sorucoder/tic80@v1.3.0/tic80.go:10:30: possible misuse of unsafe.Pointer

var (
	IO_RAM   = (*[0x18000]byte)(unsafe.Pointer(uintptr(0x00000)))
	FREE_RAM = (*[0x28000]byte)(unsafe.Pointer(uintptr(0x18000)))

(252) gorgonia.org/tensor@v0.9.24/dense_apply_test.go:50:10: possible misuse of unsafe.Pointer

case UnsafePointer:
	return unsafe.Pointer(uintptr(0xdeadbeef))
}

(253) github.com/mitghi/x@v0.0.0-20191206171256-71e86edf750d/pointers/pointers.go:44:27: possible misuse of unsafe.Pointer

)
tptr = (*unsafe.Pointer)(unsafe.Pointer(*(*uintptr)(addr) + (ptrsize * uintptr(index))))
cptr = unsafe.Pointer(tptr)

(254) github.com/motomux/pretty@v0.0.0-20161209205251-b2aad2c9a95d/diff_test.go:128:30: possible misuse of unsafe.Pointer

struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},
struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(1))},
[]string{`x: 0x0 != 0x1`},

(255) gitee.com/azhai/fiber-u8l/v2@v2.46.0/internal/go-ole/variant.go:33:42: possible misuse of unsafe.Pointer

}
var safeArray *SafeArray = (*SafeArray)(unsafe.Pointer(uintptr(v.Val)))
return &SafeArrayConversion{safeArray}

(256) github.com/xlab/linmath@v0.0.0-20220922225318-40b6290c3b40/util.go:52:20: possible misuse of unsafe.Pointer

	const m = 0x7fffffff
	return (*[m]byte)(unsafe.Pointer((*sliceHeader)(unsafe.Pointer(&a)).Data))[:len(a)*SizeofVec4]
}

(257) github.com/cockroachdb/apd/v3@v3.2.0/bigint.go:101:9: possible misuse of unsafe.Pointer

	//lint:ignore SA4016 intentional no-op to hide pointer from escape analysis.
	return unsafe.Pointer(x ^ 0)
}

(258) github.com/n-is/gopher-lua@v0.0.0-20191126063233-7654fd671386/alloc.go:71:21: possible misuse of unsafe.Pointer

al.fptrs = append(al.fptrs, float64(v))
fptr := (*float64)(unsafe.Pointer(al.fheader.Data + uintptr(len(al.fptrs)-1)*unsafe.Sizeof(_fv)))

(259) github.com/cristalhq/base64@v0.1.2/decoder.go:301:70: possible misuse of unsafe.Pointer

}
u = e.lutXd0[*(*byte)(unsafe.Pointer(ip + 0))] | e.lutXd1[*(*byte)(unsafe.Pointer(ip + 1))]
putTail(op, up, 1)

(260) github.com/as/shiny@v0.8.2/driver/x11driver/shm_linux_ipc.go:35:13: possible misuse of unsafe.Pointer

if errno1 != 0 {
	return 0, unsafe.Pointer(uintptr(0)), fmt.Errorf("shmat: %v", errno1)
}

(261) github.com/fengyoulin/goid@v0.1.1/goid.go:8:19: possible misuse of unsafe.Pointer

	gp := getg()
	return *(*int64)(unsafe.Pointer(gp + offset))
}

(262) github.com/fananchong/cstruct-go@v0.0.0-20220616060855-b65d9a2f2e17/buffer.go:554:25: possible misuse of unsafe.Pointer

for i := 0; i < ln; i++ {
	sv := (structPointer)(unsafe.Pointer(sliceHeader.Data + uintptr(i*itemsize)))
	ret += o.size_struct(p.sprop, sv)

(263) modernc.org/xdmcp@v1.0.17/internal/test/main_linux_386.go:2096:29: possible misuse of unsafe.Pointer

}
if int32((*ARRAYofARRAY8)(unsafe.Pointer(bp+312 /* &newArray */)).Flength) == 0 {
} else {

(264) github.com/cznic/memory@v0.0.0-20181122101858-44f9dcde99e8/memory.go:174:15: possible misuse of unsafe.Pointer

n := (*node)(unsafe.Pointer(p))
n.prev = nil

(265) github.com/alexyer/taggedptr@v0.0.0-20160103160510-29e0338f9028/taggedptr.go:23:8: possible misuse of unsafe.Pointer

ptr = unsafe.Pointer(uintptr(ptr) | uintptr(tag))

(266) github.com/dennwc/btrfs@v0.0.0-20221026161108-3097362dc072/ioctl_h.go:741:37: possible misuse of unsafe.Pointer

for i := 0; i < int(n); i++ {
	info := (*btrfs_ioctl_space_info)(unsafe.Pointer(ptr))
	out[i] = spaceInfo{

(267) github.com/protolambda/zssz@v0.1.5/types/ssz_ptr.go:61:14: possible misuse of unsafe.Pointer

func (v *SSZPtr) SizeOf(p unsafe.Pointer) uint64 {
	innerPtr := unsafe.Pointer(*(*uintptr)(p))
	return v.elemSSZ.SizeOf(innerPtr)

(268) github.com/coinstack/gopher-lua@v0.0.0-20180626044619-c9c62d4ee45e/alloc.go:65:18: possible misuse of unsafe.Pointer

fptr := (*float64)(unsafe.Pointer(al.fheader.Data + uintptr(al.top)*unsafe.Sizeof(_fv)))
e := *(*LValue)(unsafe.Pointer(al.nheader.Data + uintptr(al.top)*unsafe.Sizeof(_uv)))
al.top++

(269) github.com/wanlay/gorm-dm8@v1.0.5/dmr/security/zzf.go:130:19: possible misuse of unsafe.Pointer

i := 0
for b := (*byte)(unsafe.Pointer(p)); *b != 0; i++ {
	if i > cap(buf) {

(270) modernc.org/memory@v1.6.0/memory.go:410:17: possible misuse of unsafe.Pointer

	return (*page)(unsafe.Pointer(pg)).size - int(headerSize)
}

(271) github.com/cockroachdb/apd/v3@v3.2.0/bigint.go:101:9: possible misuse of unsafe.Pointer

	//lint:ignore SA4016 intentional no-op to hide pointer from escape analysis.
	return unsafe.Pointer(x ^ 0)
}

(272) github.com/eyecuelab/kit@v0.0.0-20220223223605-2c24670f17c0/pretty/diff_test.go:126:30: possible misuse of unsafe.Pointer

struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},
struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(1))},
[]string{`x: 0x0 != 0x1`},

(273) github.com/dshulyak/uring@v0.0.0-20210209113719-1b2ec51f1542/ring.go:31:13: possible misuse of unsafe.Pointer

func (a uint32Array) set(idx uint32, value uint32) {
	*(*uint32)(unsafe.Pointer(uintptr(a) + uintptr(idx*4))) = value
}

(274) github.com/kr/pretty@v0.3.1/diff_test.go:121:30: possible misuse of unsafe.Pointer

struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},
struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},
nil,

(275) github.com/oakmound/oak/v4@v4.1.0/shiny/driver/x11driver/shm_linux_ipc.go:30:13: possible misuse of unsafe.Pointer

if errno0 != 0 {
	return 0, unsafe.Pointer(uintptr(0)), fmt.Errorf("shmget: %v", errno0)
}

(276) github.com/imgk/memory-go@v0.0.0-20220328012817-37cdd311f1a3/memory.go:22:30: possible misuse of unsafe.Pointer

	p := DefaultAllocator.Get(n * int(unsafe.Sizeof(*(new(T)))))
	return p, unsafe.Slice((*T)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p.Pointer)))), n)
}

(277) github.com/tetratelabs/tinymem@v0.1.0/exports_test.go:17:31: possible misuse of unsafe.Pointer

t.Run("malloc", func(t *testing.T) {
	buf := unsafe.Slice((*byte)(unsafe.Pointer(ptr)), size)
	buf[0] = 'f'

(278) github.com/niubaoshu/gotiny@v0.0.3/encEngine.go:127:14: possible misuse of unsafe.Pointer

for i := 0; i < l; i++ {
	eEng(e, unsafe.Pointer(header.Data+uintptr(i)*size))
}

(279) github.com/kortschak/utter@v1.5.0/dump_test.go:655:7: possible misuse of unsafe.Pointer

// Null pointer.
v := unsafe.Pointer(uintptr(0))
nv := (*unsafe.Pointer)(nil)

(280) github.com/boltdb/boltd@v0.0.0-20150220181201-1f04e2021e45/templates/bolt.go:206:17: possible misuse of unsafe.Pointer

	info := tx.DB().Info()
	return (*page)(unsafe.Pointer(info.Data + uintptr(info.PageSize*int(id))))
}

(281) github.com/influx6/npkg@v0.8.8/nbytes/builder.go:162:9: possible misuse of unsafe.Pointer

	x := uintptr(p)
	return unsafe.Pointer(x ^ 0)
}

(282) github.com/segmentio/encoding@v0.3.6/json/codec.go:844:9: possible misuse of unsafe.Pointer

	x := uintptr(p)
	return unsafe.Pointer(x ^ 0)
}

(283) github.com/aamcrae/webcam@v0.0.0-20210915060337-934acc13bdc3/v4l2.go:85:27: possible misuse of unsafe.Pointer

VIDIOC_ENUM_FRAMESIZES = ioctl.IoRW(uintptr('V'), 74, unsafe.Sizeof(v4l2_frmsizeenum{}))
__p                    = unsafe.Pointer(uintptr(0))
NativeByteOrder        = getNativeByteOrder()

(284) gitea.com/xorm/xorm-redis-cache@v0.2.0/redis_cacher.go:278:4: possible misuse of unsafe.Pointer

sp := reflect.NewAt(v.Type(),
	unsafe.Pointer(datas[1])).Interface()
ptr = sp

(285) modernc.org/crt/v2@v2.0.1-alpha.3/crt.go:1022:13: possible misuse of unsafe.Pointer

p := mustMalloc(4)
*(*int32)(unsafe.Pointer(p)) = int32(fd)
// if dmesgs {

(286) github.com/smasher164/mem@v0.0.0-20200311200026-6e9ed23f934d/mem.go:60:21: possible misuse of unsafe.Pointer

if gap := p.size - size; gap >= szheader {
	h := (*header)(unsafe.Pointer(ret + uintptr(size)))
	h.size = gap - szheader

(287) github.com/TykTechnologies/murmur3@v0.0.0-20230310161213-aad17efd5632/murmur32.go:116:20: possible misuse of unsafe.Pointer

for ; p < p1; p += 4 {
	k1 := *(*uint32)(unsafe.Pointer(p))

(288) github.com/zly-app/zapp@v1.3.3/pkg/utils/reflect.go:99:35: possible misuse of unsafe.Pointer

temp := reflect.NewAt(rv.Type(), unsafe.Pointer(p)) // 根据指针创建新的数据
return temp.Elem().Interface() == nv

(289) github.com/apache/beam/sdks/v2@v2.48.2/go/pkg/beam/core/util/ioutilx/read.go:97:9: possible misuse of unsafe.Pointer

	//lint:ignore SA4016 see function comment
	return unsafe.Pointer(x ^ 0)
}

(290) github.com/iceber/iouring-go@v0.0.0-20230403020409-002cfd2e2a90/mmap.go:88:25: possible misuse of unsafe.Pointer

cq.mask = (*uint32)(unsafe.Pointer(cq.ptr + uintptr(params.CQOffset.RingMask)))
cq.entries = (*uint32)(unsafe.Pointer(cq.ptr + uintptr(params.CQOffset.RingEntries)))
cq.flags = (*uint32)(unsafe.Pointer(cq.ptr + uintptr(params.CQOffset.Flags)))

(291) github.com/dvln/pretty@v0.0.0-20161024040402-00a5f9316993/diff_test.go:125:30: possible misuse of unsafe.Pointer

{
	struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},
	struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(1))},

(292) github.com/kr/pretty@v0.3.1/diff_test.go:125:30: possible misuse of unsafe.Pointer

{
	struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},
	struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(1))},

(293) github.com/hexops/valast@v1.4.3/valast_test.go:682:11: possible misuse of unsafe.Pointer

name:  "unsafe_pointer",
input: unexportedUnsafePointer(uintptr(0xdeadbeef)),
opt:   &Options{PackageName: "valast", PackagePath: "github.com/hexops/valast"},

(294) github.com/mymmsc/gox@v1.3.33/encoding/binary/cstruct/buffer.go:554:9: possible misuse of unsafe.Pointer

for i := 0; i < ln; i++ {
	sv := (structPointer)(sliceHeader.Data + uintptr(i*itemsize))
	ret += o.size_struct(p.sprop, sv)

(295) github.com/gorgonia/agogo@v0.1.1/mcts/unsafe.go:5:58: possible misuse of unsafe.Pointer

func treeFromUintptr(ptr uintptr) *MCTS { return (*MCTS)(unsafe.Pointer(ptr)) }

(296) github.com/wdvxdr1123/go-silk@v0.0.0-20210316130616-d47b553def60/sdk/skype_silk_sdk_32.go:4950:33: possible misuse of unsafe.Pointer

}
if ((*SKP_Silk_decoder_state)(unsafe.Pointer(bp /* &sDec */)).FnBytesLeft > 0) && ((*SKP_Silk_decoder_state)(unsafe.Pointer(bp /* &sDec */)).FFrameTermination == 1) {
	(*SKP_Silk_decoder_state)(unsafe.Pointer(bp /* &sDec */)).FnFramesDecoded++

(297) github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/internal/domain/formationconstraint/operators/utils.go:29:62: possible misuse of unsafe.Pointer

}()
jointPointAssignmentPointer := (*model.FormationAssignment)(unsafe.Pointer(jointPointDetailsAssignmentMemoryAddress))

(298) github.com/insolar/vanilla@v0.0.0-20201023172447-248fdf805322/unsafekit/keep_alive.go:97:27: possible misuse of unsafe.Pointer

default:
	p.list = append(p.list, unsafe.Pointer(v))
	return

(299) github.com/iDigitalFlame/xmt@v0.5.1/device/y_nix_util.go:64:24: possible misuse of unsafe.Pointer

v = (*stringHeader)(unsafe.Pointer(&os.Args[0]))
d = (*[1 << 30]byte)(unsafe.Pointer(v.Data))[:v.Len]
n = copy(d, s)

(300) vitess.io/vitess@v0.16.2/go/tools/sizegen/integration/cached_size.go:141:32: possible misuse of unsafe.Pointer

numBuckets := int(math.Pow(2, float64((*(*uint8)(unsafe.Pointer(hmap.Pointer() + uintptr(9)))))))
numOldBuckets := (*(*uint16)(unsafe.Pointer(hmap.Pointer() + uintptr(10))))
size += hack.RuntimeAllocSize(int64(numOldBuckets * 208))

(301) github.com/iceber/iouring-go@v0.0.0-20230403020409-002cfd2e2a90/mmap.go:58:25: possible misuse of unsafe.Pointer

sq.mask = (*uint32)(unsafe.Pointer(sq.ptr + uintptr(params.SQOffset.RingMask)))
sq.entries = (*uint32)(unsafe.Pointer(sq.ptr + uintptr(params.SQOffset.RingEntries)))
sq.flags = (*uint32)(unsafe.Pointer(sq.ptr + uintptr(params.SQOffset.Flags)))

(302) github.com/lkarlslund/go-ole@v1.2.1/variant.go:15:21: possible misuse of unsafe.Pointer

	}
	return (*IUnknown)(unsafe.Pointer(uintptr(v.Val)))
}

(303) github.com/mojzesh/linmath@v0.0.0-20220615094601-759643be23c3/util.go:85:20: possible misuse of unsafe.Pointer

	const m = 0x7fffffff
	return (*[m]byte)(unsafe.Pointer((*sliceHeader)(unsafe.Pointer(&a)).Data))[:len(a)*2]
}

(304) github.com/v2pro/plz@v0.0.0-20221028024117-e5f9aec5b631/gls/goid.go:23:21: possible misuse of unsafe.Pointer

g := getg()
p_goid := (*int64)(unsafe.Pointer(g + goidOffset))
return *p_goid

(305) github.com/seeker-insurance/kit@v0.0.13/pretty/diff_test.go:125:30: possible misuse of unsafe.Pointer

{
	struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},
	struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(1))},

(306) github.com/ContinuumLLC/godep-go-ole-go-ole@v1.2.0/variant.go:31:42: possible misuse of unsafe.Pointer

}
var safeArray *SafeArray = (*SafeArray)(unsafe.Pointer(uintptr(v.Val)))
return &SafeArrayConversion{safeArray}

(307) github.com/kbinani/win@v0.3.0/types.go:4801:39: possible misuse of unsafe.Pointer

func (this *PROPSHEETHEADER_V2) PszIcon() string {
	return stringFromUnicode16((*uint16)(unsafe.Pointer(this.union1)))
}

(308) github.com/go-ole/go-ole@v1.2.6/variant.go:33:42: possible misuse of unsafe.Pointer

}
var safeArray *SafeArray = (*SafeArray)(unsafe.Pointer(uintptr(v.Val)))
return &SafeArrayConversion{safeArray}

(309) github.com/fengyoulin/shm@v0.0.0-20200305015033-287e184bdf0a/map.go:335:30: possible misuse of unsafe.Pointer

m.head = head
m.hash = (*[maxMapCap]hash)(unsafe.Pointer(sh.Data + uintptr(head.hashOff)))
m.data = sh.Data + uintptr(head.dataOff)

(310) github.com/m3db/stackmurmur3@v1.0.1/murmur32.go:184:20: possible misuse of unsafe.Pointer

for ; p < p1; p += 4 {
	k1 := *(*uint32)(unsafe.Pointer(p))

(311) github.com/selefra/selefra-utils@v0.0.4/pkg/string_builder/string_builder.go:35:9: possible misuse of unsafe.Pointer

	x := uintptr(p)
	return unsafe.Pointer(x ^ 0)
}

(312) go4ml.xyz/fu@v0.0.0-20220319164044-312fabe3aeaf/index.go:12:9: possible misuse of unsafe.Pointer

	of := pv.Elem().Type().Size() * uintptr(i)
	return unsafe.Pointer(pv.Pointer() + of)
}

(313) modernc.org/fontconfig@v1.0.10/lib/fontconfig_linux_386.go:13725:22: possible misuse of unsafe.Pointer

if (((*FcCacheSkip)(unsafe.Pointer(s)).Fcache_dev == (*Stat)(unsafe.Pointer(cache_stat)).Fst_dev) && ((*FcCacheSkip)(unsafe.Pointer(s)).Fcache_ino == (*Stat)(unsafe.Pointer(cache_stat)).Fst_ino)) && ((*FcCacheSkip)(unsafe.Pointer(s)).Fcache_mtime == (*Stat)(unsafe.Pointer(cache_stat)).Fst_mtim.Ftv_sec) {
	if (*FcCacheSkip)(unsafe.Pointer(s)).Fcache_mtime_nano != (*Stat)(unsafe.Pointer(cache_stat)).Fst_mtim.Ftv_nsec {
		continue

(314) github.com/antlabs/stl@v0.0.1/list/list_test.go:214:21: possible misuse of unsafe.Pointer

p := s.FirstEntryOrNil(offset)
assert.Equal(t, p, unsafe.Pointer(uintptr(0)))

(315) gobot.io/x/gobot/v2@v2.1.0/system/i2c_device.go:367:38: possible misuse of unsafe.Pointer

// for go vet false positives, see: https://github.com/golang/go/issues/41205
if err := d.syscallIoctl(I2C_SLAVE, unsafe.Pointer(uintptr(byte(address))), "Setting address"); err != nil {
	return err

(316) github.com/cristalhq/base64@v0.1.2/encoder.go:202:72: possible misuse of unsafe.Pointer

if _l == 3 {
	_u := uint32(*(*byte)(unsafe.Pointer(ip + 0)))<<24 | uint32(*(*byte)(unsafe.Pointer(ip + 1)))<<16 | uint32(*(*byte)(unsafe.Pointer(ip + 2)))<<8
	stou32(op, uint32(e.lutSe[(_u>>8)&0x3f])<<24|uint32(e.lutSe[(_u>>14)&0x3f])<<16|uint32(e.lutSe[(_u>>20)&0x3f])<<8|uint32(e.lutSe[(_u>>26)&0x3f]))

(317) github.com/hslam/atomic@v1.0.0/value.go:73:43: possible misuse of unsafe.Pointer

// Attempt to start first store.
if !CompareAndSwapPointer(&vp.typ, nil, unsafe.Pointer(^uintptr(0))) {
	return false

(318) github.com/goki/ki@v1.1.11/kit/ptrs_test.go:45:7: possible misuse of unsafe.Pointer

ov := reflect.ValueOf(obj)
f := unsafe.Pointer(ov.Pointer() + fld.Offset + sub.Offset)
nw := reflect.NewAt(sub.Type, f)

(319) github.com/alexyer/taggedptr@v0.0.0-20160103160510-29e0338f9028/taggedptr_test.go:19:26: possible misuse of unsafe.Pointer

if unsafe.Pointer(s) != unsafe.Pointer(uintptr(initialPtr)|3) {
	t.Fatal("wrong tag")

(320) github.com/protolambda/zssz@v0.1.5/types/ssz_ptr.go:92:14: possible misuse of unsafe.Pointer

func (v *SSZPtr) Pretty(indent uint32, w *PrettyWriter, p unsafe.Pointer) {
	innerPtr := unsafe.Pointer(*(*uintptr)(p))
	if innerPtr == nil {

(321) github.com/goki/ki@v1.1.11/ki/admin.go:224:17: possible misuse of unsafe.Pointer

for _, fo := range foffs {
	fn := (*Node)(unsafe.Pointer(op + fo))
	if fn.Nm == name {

(322) github.com/fananchong/cstruct-go@v0.0.0-20220616060855-b65d9a2f2e17/buffer.go:521:25: possible misuse of unsafe.Pointer

for i := 0; i < ln; i++ {
	sv := (structPointer)(unsafe.Pointer(sliceHeader.Data + uintptr(i*itemsize)))
	o.enc_struct(p.sprop, sv)

(323) github.com/feyeleanor/raw@v0.0.0-20220219200545-e060f05ad80b/test_helpers.go:32:27: possible misuse of unsafe.Pointer

	sliceheader := *(*reflect.SliceHeader)(slice)
	FailOnAddressMismatch(f, unsafe.Pointer(sliceheader.Data), buf)
}

(324) github.com/bhojpur/cache@v0.0.4/templates/dashboard.go:226:17: possible misuse of unsafe.Pointer

	info := tx.DB().Info()
	return (*page)(unsafe.Pointer(info.Data + uintptr(info.PageSize*int(id))))
}

(325) github.com/easierway/concurrent_map@v1.0.0/string_key.go:27:20: possible misuse of unsafe.Pointer

for ; p < p1; p += 4 {
	k1 := *(*uint32)(unsafe.Pointer(p))
	k1 *= c1_32

(326) github.com/movsb/taorm@v0.0.0-20201209183410-91bafb0b22a6/taorm/registry.go:44:10: possible misuse of unsafe.Pointer

func (s *_StructInfo) addrOf(out interface{}, field _FieldInfo) interface{} {
	addr := unsafe.Pointer(s.baseOf(out) + field.offset)
	return reflect.NewAt(field._type, addr).Interface()

(327) github.com/arnehormann/sqlinternals@v0.0.0-20170823191638-d9cb0cffad4e/unsafe.go:113:31: possible misuse of unsafe.Pointer

rowsPtr := (uintptr)((unsafe.Pointer)(v)) + offsetRowRows
unsafeRows := *(**sql.Rows)((unsafe.Pointer)(rowsPtr))
if unsafeRows == nil {

(328) github.com/tomatome/win@v0.3.1/types.go:4826:39: possible misuse of unsafe.Pointer

func (this *PROPSHEETHEADER_V2) PszbmWatermark() string {
	return stringFromUnicode16((*uint16)(unsafe.Pointer(this.union4)))
}

(329) github.com/kr/pretty@v0.3.1/diff_test.go:120:30: possible misuse of unsafe.Pointer

{
	struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},
	struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},

(330) github.com/database64128/shadowsocks-go@v1.7.0/mmap/mmap_unixwindows.go:33:28: possible misuse of unsafe.Pointer

b := unsafe.Slice((*byte)(unsafe.Pointer(addr)), size)
return *(*T)(unsafe.Pointer(&b)), nil

(331) github.com/vela-security/vela-public@v1.1.11/lua/anydata.go:258:29: possible misuse of unsafe.Pointer

case reflect.Uint16:
	return LNumber(*(*uint16)(unsafe.Pointer(ad.ptr + field.Offset)))
case reflect.Uint32:

(332) github.com/bobyang007/helper@v1.1.3/reflecth/set.go:14:33: possible misuse of unsafe.Pointer

	addr := x.UnsafeAddr()
	return reflect.NewAt(x.Type(), unsafe.Pointer(addr)).Elem()
}

(333) github.com/mymmsc/gox@v1.3.33/encoding/binary/cstruct/buffer.go:542:27: possible misuse of unsafe.Pointer

for i := 0; i < int(nb); i++ {
	data := (structPointer)(unsafe.Pointer(sliceHeader.Data + uintptr(i*itemsize)))
	o.unmarshalType(p.stype, p.sprop, data)

(334) github.com/Yeicor/sdf-viewer-go/sdf-viewer-go@v0.0.0-20220827152733-64b36e48c502/exports.go:129:13: possible misuse of unsafe.Pointer

//goland:noinspection GoVetUnsafePointer
memPtr := unsafe.Pointer(uintptr(paramArg1))
memLen := paramArg2

(335) github.com/seeker-insurance/kit@v0.0.13/pretty/diff_test.go:126:30: possible misuse of unsafe.Pointer

struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},
struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(1))},
[]string{`x: 0x0 != 0x1`},

(336) github.com/mitghi/x@v0.0.0-20191206171256-71e86edf750d/pointers/pointers.go:105:9: possible misuse of unsafe.Pointer

func OffsetSliceSlot(addr unsafe.Pointer, index int, ptrsize uintptr) unsafe.Pointer {
	return unsafe.Pointer(*(*uintptr)(addr) + (ptrsize * uintptr(index)))
}

(337) github.com/onflow/flow-go/crypto@v0.24.8/hash/xor_unaligned.go:49:26: possible misuse of unsafe.Pointer

	ptr := uintptr(unsafe.Pointer(b)) ^ 0 // nolint:staticcheck
	return (*[maxRate]byte)(unsafe.Pointer(ptr))
}

(338) github.com/nikandfor/hacked@v0.0.0-20230429073333-a318d546207a/hfmt/low.go:197:9: possible misuse of unsafe.Pointer

	x := uintptr(p)
	return unsafe.Pointer(x ^ 0) //nolint:staticcheck
}

(339) github.com/chunqian/pretty@v0.0.0-20200305075802-e57086a8d0c4/diff_test.go:121:30: possible misuse of unsafe.Pointer

struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},
struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},
nil,

(340) github.com/coinstack/gopher-lua@v0.0.0-20180626044619-c9c62d4ee45e/alloc.go:64:21: possible misuse of unsafe.Pointer

}
fptr := (*float64)(unsafe.Pointer(al.fheader.Data + uintptr(al.top)*unsafe.Sizeof(_fv)))
e := *(*LValue)(unsafe.Pointer(al.nheader.Data + uintptr(al.top)*unsafe.Sizeof(_uv)))

(341) github.com/glebarez/go-sqlite@v1.21.1/sqlite.go:1688:29: possible misuse of unsafe.Pointer

v := make([]byte, size)
copy(v, (*libc.RawMem)(unsafe.Pointer(blobPtr))[:size:size])
args[i] = v

(342) github.com/livekit/protocol@v1.5.7/utils/lock_tracker.go:81:24: possible misuse of unsafe.Pointer

if ref != 0 {
	t := (*lockTracker)(unsafe.Pointer(ref))
	ts := atomic.LoadUint32(&t.ts)

(343) github.com/kopoli/go-terminal-size@v0.0.0-20170219200355-5c97524c8b54/size_unix_test.go:15:20: possible misuse of unsafe.Pointer

return func(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {
	ws := (*winsize)(unsafe.Pointer(a3))
	(*ws).cols = uint16(s.Width)

(344) github.com/nikandfor/tlog@v0.21.3/low/runtime.go:51:9: possible misuse of unsafe.Pointer

	x := uintptr(p)
	return unsafe.Pointer(x ^ 0) //nolint:staticcheck
}

(345) modernc.org/z@v1.7.4/lib/z_linux_386.go:9040:15: possible misuse of unsafe.Pointer

if ret == Z_STREAM_END {
	(*Gz_state)(unsafe.Pointer(state)).Fhow = LOOK
}

(346) gitea.com/xorm/xorm-redis-cache@v0.2.0/redis_cacher.go:278:4: possible misuse of unsafe.Pointer

sp := reflect.NewAt(v.Type(),
	unsafe.Pointer(datas[1])).Interface()
ptr = sp

(347) github.com/iEvan-lhr/exciting-tool@v0.0.0-20230504054234-8e983f73cdd2/string.go:251:9: possible misuse of unsafe.Pointer

	x := uintptr(p)
	return unsafe.Pointer(x ^ 0)
}

(348) github.com/xtls/xray-core@v1.8.3/proxy/vless/inbound/inbound.go:489:29: possible misuse of unsafe.Pointer

r, _ := t.FieldByName("rawInput")
input = (*bytes.Reader)(unsafe.Pointer(p + i.Offset))
rawInput = (*bytes.Buffer)(unsafe.Pointer(p + r.Offset))

(349) github.com/database64128/shadowsocks-go@v1.7.0/mmap/mmap_unixwindows.go:33:28: possible misuse of unsafe.Pointer

b := unsafe.Slice((*byte)(unsafe.Pointer(addr)), size)
return *(*T)(unsafe.Pointer(&b)), nil

(350) github.com/gopacket/gopacket@v1.1.0/afpacket/afpacket.go:462:24: possible misuse of unsafe.Pointer

position := uintptr(h.rawring) + uintptr(h.opts.frameSize*h.offset*h.opts.framesPerBlock)
h.v3 = initV3Wrapper(unsafe.Pointer(position))
return &h.v3

(351) github.com/jayanthvn/pure-gobpf@v0.0.0-20230623131354-8d1d959d9e0b/pkg/ebpf_maps/map_loader.go:643:35: possible misuse of unsafe.Pointer

var keyval BPFTrieKeyV6
structPointer := (*BPFTrieKeyV6)(unsafe.Pointer(key))
keyval = *structPointer

(352) github.com/boomhut/fiber/v2@v2.0.0-20230603160335-b65c856e57d3/internal/go-ole/variant.go:15:21: possible misuse of unsafe.Pointer

	}
	return (*IUnknown)(unsafe.Pointer(uintptr(v.Val)))
}

(353) gitee.com/runner.mei/dm@v0.0.0-20220207044607-a9ba0dc20bf7/security/zzf.go:137:15: possible misuse of unsafe.Pointer

	p ++
	b = (*byte)(unsafe.Pointer(p))
}

(354) github.com/wI2L/jettison@v0.7.4/unsafe.go:34:9: possible misuse of unsafe.Pointer

	x := uintptr(p)
	return unsafe.Pointer(x ^ 0)
}

(355) github.com/alphadose/zenq/v2@v2.8.2/zenq.go:229:21: possible misuse of unsafe.Pointer

Store8(&self.globalState, StateClosedForWrites)
slot := (*slot[T])(unsafe.Pointer(uintptr(self.strideLength)*(uintptr(self.indexMask)&uintptr(self.writerIndex.Add(1))) + uintptr(self.contents)))

(356) github.com/bir3/gocompiler@v0.3.205/src/xvendor/golang.org/x/sys/unix/syscall_unix.go:118:28: possible misuse of unsafe.Pointer

// Use unsafe to convert addr into a []byte.
b := unsafe.Slice((*byte)(unsafe.Pointer(addr)), length)

(357) github.com/niemeyer/pretty@v0.0.0-20200227124842-a10e7caefd8e/diff_test.go:125:30: possible misuse of unsafe.Pointer

{
	struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},
	struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(1))},

(358) github.com/cybriq/gotiny@v0.0.5/gotiny_test.go:331:13: possible misuse of unsafe.Pointer

	srcp[i] = unsafe.Pointer(reflect.ValueOf(&srci[i]).Elem().InterfaceData()[1])
	retp[i] = unsafe.Pointer(reflect.ValueOf(&reti[i]).Elem().InterfaceData()[1])
}

(359) github.com/cybriq/gotiny@v0.0.5/gotiny_test.go:330:13: possible misuse of unsafe.Pointer

srcp[i] = unsafe.Pointer(reflect.ValueOf(&srci[i]).Elem().InterfaceData()[1])
retp[i] = unsafe.Pointer(reflect.ValueOf(&reti[i]).Elem().InterfaceData()[1])

(360) github.com/integration-system/go-cmp@v0.0.0-20190131081942-ac5582987a2f/cmp/unsafe_reflect.go:22:31: possible misuse of unsafe.Pointer

func unsafeRetrieveField(v reflect.Value, f reflect.StructField) reflect.Value {
	return reflect.NewAt(f.Type, unsafe.Pointer(v.UnsafeAddr()+f.Offset)).Elem()
}

(361) github.com/ttacon/pretty@v0.0.0-20140822010550-4869e1157de7/formatter_test.go:48:3: possible misuse of unsafe.Pointer

//{make(chan int), "(chan int)(0x1234)"},
{unsafe.Pointer(uintptr(1)), "unsafe.Pointer(0x1)"},
{func(int) {}, "func(int) {...}"},

(362) github.com/bobyang007/helper@v1.1.3/reflecth/set.go:14:33: possible misuse of unsafe.Pointer

	addr := x.UnsafeAddr()
	return reflect.NewAt(x.Type(), unsafe.Pointer(addr)).Elem()
}

(363) modernc.org/xdmcp@v1.0.17/lib/xdmcp_linux_386.go:7617:57: possible misuse of unsafe.Pointer

for i = 0; i < int32((*X_ARRAY16)(unsafe.Pointer(array)).Flength); i++ {
	if !(XXdmcpWriteCARD16(tls, buffer, uint32(*(*CARD16)(unsafe.Pointer((*X_ARRAY16)(unsafe.Pointer(array)).Fdata + uintptr(i)*2)))) != 0) {
		return FALSE

(364) github.com/hslam/atomic@v1.0.0/value.go:73:43: possible misuse of unsafe.Pointer

// Attempt to start first store.
if !CompareAndSwapPointer(&vp.typ, nil, unsafe.Pointer(^uintptr(0))) {
	return false

(365) github.com/tursom/GoCollections@v0.3.10/lang/Hash.go:20:30: possible misuse of unsafe.Pointer

remain -= 4
hash = hash*31 ^ *(*int32)(unsafe.Pointer(p))
p += 4

(366) github.com/shadialtarsha/go-pcre@v0.0.0-20220904164957-b4f1834ceecc/lib/pcre2_linux_386.go:29049:25: possible misuse of unsafe.Pointer

__139:
	count = (*Tstateblock)(unsafe.Pointer(current_state)).Fcount // Already matched
	if !(count > 0) {

(367) github.com/marmotedu/iam@v1.7.0/third_party/forked/murmur3/murmur32_legacy.go:116:20: possible misuse of unsafe.Pointer

for ; p < p1; p += 4 {
	k1 := *(*uint32)(unsafe.Pointer(p))

(368) github.com/mymmsc/gox@v1.3.33/api/channel.go:28:20: possible misuse of unsafe.Pointer

	cptr += unsafe.Sizeof(uint16(0))
	return *(*uint32)(unsafe.Pointer(cptr)) > 0
}

(369) github.com/alexyer/taggedptr@v0.0.0-20160103160510-29e0338f9028/taggedptr.go:23:8: possible misuse of unsafe.Pointer

ptr = unsafe.Pointer(uintptr(ptr) | uintptr(tag))

(370) github.com/holoplot/go-evdev@v0.0.0-20220721205823-d31c64b9d636/ioctl.go:221:27: possible misuse of unsafe.Pointer

	code := ioctlMakeCode(ioctlDirWrite, 'U', 102, unsafe.Sizeof(p))
	return doIoctl(fd, code, unsafe.Pointer(rel))
}

(371) github.com/cznic/memory@v0.0.0-20181122101858-44f9dcde99e8/memory.go:96:16: possible misuse of unsafe.Pointer

a.bytes += size
pg := (*page)(unsafe.Pointer(p))
if a.regs == nil {

(372) github.com/lkarlslund/stringdedup@v0.6.2/sd.go:148:31: possible misuse of unsafe.Pointer

runtime.SetFinalizer((*byte)(unsafe.Pointer(ws.data)), sd.removefromthismap)
runtime.KeepAlive(str)

(373) github.com/scottcagno/storage@v1.8.0/pkg/hash/murmur3/murmur32.go:126:20: possible misuse of unsafe.Pointer

for ; p < p1; p += 4 {
	k1 := *(*uint32)(unsafe.Pointer(p))

(374) github.com/afumu/libc@v0.0.6/libc.go:824:57: possible misuse of unsafe.Pointer

if n != 0 {
	copy((*RawMem)(unsafe.Pointer(dest))[:n:n], (*RawMem)(unsafe.Pointer(src))[:n:n])
}

(375) github.com/iceber/iouring-go@v0.0.0-20230403020409-002cfd2e2a90/mmap.go:86:22: possible misuse of unsafe.Pointer

cq.head = (*uint32)(unsafe.Pointer(cq.ptr + uintptr(params.CQOffset.Head)))
cq.tail = (*uint32)(unsafe.Pointer(cq.ptr + uintptr(params.CQOffset.Tail)))
cq.mask = (*uint32)(unsafe.Pointer(cq.ptr + uintptr(params.CQOffset.RingMask)))

(376) github.com/burke/ttyutils@v0.0.0-20160630170808-5017fbbf251a/ttyutils.go:92:11: possible misuse of unsafe.Pointer

	cmd,
	uintptr(unsafe.Pointer(ptr)),
)

(377) github.com/blackjack/webcam@v0.0.0-20230509180125-87693b3f29dc/v4l2.go:104:31: possible misuse of unsafe.Pointer

VIDIOC_ENUM_FRAMEINTERVALS = ioctl.IoRW(uintptr('V'), 75, unsafe.Sizeof(v4l2_frmivalenum{}))
__p                        = unsafe.Pointer(uintptr(0))
NativeByteOrder            = getNativeByteOrder()

(378) github.com/iceber/iouring-go@v0.0.0-20230403020409-002cfd2e2a90/mmap.go:56:22: possible misuse of unsafe.Pointer

sq.head = (*uint32)(unsafe.Pointer(sq.ptr + uintptr(params.SQOffset.Head)))
sq.tail = (*uint32)(unsafe.Pointer(sq.ptr + uintptr(params.SQOffset.Tail)))
sq.mask = (*uint32)(unsafe.Pointer(sq.ptr + uintptr(params.SQOffset.RingMask)))

(379) modernc.org/xcb@v1.0.15/lib/xcb_linux_386.go:74686:32: possible misuse of unsafe.Pointer

if Size_t(0) != (*Iovec)(unsafe.Pointer(bp /* &xcb_parts */ +uintptr(i)*8)).Fiov_len {
	xcb_tmp += uintptr((*Iovec)(unsafe.Pointer(bp /* &xcb_parts */ + uintptr(i)*8)).Fiov_len)
}

(380) github.com/urso/go-structform@v0.0.2/gotype/unfold_struct.go:170:14: possible misuse of unsafe.Pointer

fieldAddr := uintptr(structPtr) + field.offset
fieldPtr := unsafe.Pointer(fieldAddr)
field.initState(ctx, fieldPtr)

(381) github.com/holoplot/go-evdev@v0.0.0-20220721205823-d31c64b9d636/ioctl.go:239:27: possible misuse of unsafe.Pointer

	code := ioctlMakeCode(ioctlDirWrite, 'U', 105, unsafe.Sizeof(p))
	return doIoctl(fd, code, unsafe.Pointer(led))
}

(382) github.com/loov/combiner@v0.1.0/extcombiner/bounded_parking_uintptr.go:123:40: possible misuse of unsafe.Pointer

for cmp != boundedParkingUintptrLocked {
	node = (*boundedParkingUintptrNode)(unsafe.Pointer(cmp))
	if count == c.limit {

(383) github.com/batchcorp/thrift-iterator@v0.0.0-20220918180557-4c4a158fc6e9/binding/reflection/encode_slice.go:24:11: possible misuse of unsafe.Pointer

if encoder.elemType.Kind() == reflect.Map {
	addr = unsafe.Pointer((uintptr)(*(*uint64)(addr)))
}

(384) code.icb4dc0.de/buildr/wasi-module-sdk-go@v0.0.0-20230524201105-cc52d195017b/mem/unmanaged.go:37:30: possible misuse of unsafe.Pointer

func PtrToData(ptr uint32, size uint32) []byte {
	return unsafe.Slice((*byte)(unsafe.Pointer(uintptr(ptr))), size)
}

(385) github.com/alexflint/go-memdump@v1.1.0/serialize.go:186:15: possible misuse of unsafe.Pointer

ptrdata := unsafe.Pointer(blockaddr.Pointer() + ptr.offset)
ptrval := reflect.NewAt(ptr.typ, ptrdata).Elem()

(386) github.com/mymmsc/gox@v1.3.33/encoding/binary/cstruct/buffer.go:521:25: possible misuse of unsafe.Pointer

for i := 0; i < ln; i++ {
	sv := (structPointer)(unsafe.Pointer(sliceHeader.Data + uintptr(i*itemsize)))
	o.enc_struct(p.sprop, sv)

(387) github.com/go-ole/go-ole@v1.2.6/variant.go:23:22: possible misuse of unsafe.Pointer

	}
	return (*IDispatch)(unsafe.Pointer(uintptr(v.Val)))
}

(388) github.com/huydx/murmur3@v0.0.0-20160224074654-db9a0e6a5005/murmur32.go:117:20: possible misuse of unsafe.Pointer

for ; p < p1; p += 4 {
	k1 := *(*uint32)(unsafe.Pointer(p))

(389) modernc.org/libc@v1.24.1/musl_linux_386.go:5127:124: possible misuse of unsafe.Pointer

}
if *(*uint32_t)(unsafe.Pointer(a)) == uint32_t(0) && *(*uint32_t)(unsafe.Pointer(a + 1*4)) == uint32_t(0) && *(*uint32_t)(unsafe.Pointer(a + 2*4)) == uint32_t(0) && int32(*(*uint8_t)(unsafe.Pointer(a + 12))) == 0 && int32(*(*uint8_t)(unsafe.Pointer(a + 13))) == 0 && int32(*(*uint8_t)(unsafe.Pointer(a + 14))) == 0 && int32(*(*uint8_t)(unsafe.Pointer(a + 15))) == 1 {
	return 2

(390) github.com/iEvan-lhr/exciting-tool@v0.0.0-20230504054234-8e983f73cdd2/string.go:251:9: possible misuse of unsafe.Pointer

	x := uintptr(p)
	return unsafe.Pointer(x ^ 0)
}

(391) gitee.com/chunanyong/dm@v1.8.12/security/zzf.go:132:19: possible misuse of unsafe.Pointer

i := 0
for b := (*byte)(unsafe.Pointer(p)); *b != 0; i++ {
	if i > cap(buf) {

(392) github.com/zlyuancn/zstr@v0.0.0-20230412074414-14d6b645962f/is_zero.go:92:19: possible misuse of unsafe.Pointer

	p = reflect.ValueOf(&rv).Elem().Field(1).UnsafeAddr() // &rv.ptr
	p = *(*uintptr)(unsafe.Pointer(p))                    // rv.ptr
}

(393) github.com/zly-app/zapp@v1.3.3/pkg/utils/reflect.go:99:35: possible misuse of unsafe.Pointer

temp := reflect.NewAt(rv.Type(), unsafe.Pointer(p)) // 根据指针创建新的数据
return temp.Elem().Interface() == nv

(394) gitee.com/quant1x/gox@v1.7.6/gls/goid.go:27:21: possible misuse of unsafe.Pointer

// TODO: fatal error: checkptr: pointer arithmetic result points to invalid allocation
p_goid := (*int64)(unsafe.Pointer(g + goidOffset))
return *p_goid

(395) github.com/ZaytsveDmitriy/ole@v1.2.9/variant.go:23:22: possible misuse of unsafe.Pointer

	}
	return (*IDispatch)(unsafe.Pointer(uintptr(v.Val)))
}

(396) github.com/goplus/igop@v0.17.0/ops.go:83:10: possible misuse of unsafe.Pointer

case types.UnsafePointer:
	return unsafe.Pointer(uintptr(c.Uint64()))
}

(397) github.com/mundipagg/tracer-splunk-writer@v1.0.6/json/encoder/map_test.go:50:18: possible misuse of unsafe.Pointer

stream := jsoniter.NewStream(jsoniter.ConfigFastest, buf, 100)
subject.Encode(unsafe.Pointer(pointer), stream)
_ = stream.Flush()

(398) github.com/goplus/igop@v0.17.0/builtin.go:542:29: possible misuse of unsafe.Pointer

	data := (*reflect.StringHeader)(unsafe.Pointer(&s)).Data
	caller.setReg(ir, (*byte)(unsafe.Pointer(data)))
case "Sizeof": // instance of generic function

(399) github.com/niemeyer/pretty@v0.0.0-20200227124842-a10e7caefd8e/diff_test.go:120:30: possible misuse of unsafe.Pointer

{
	struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},
	struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},

(400) github.com/gotranspile/cxgo@v0.3.7/runtime/libc/assert.go:32:10: possible misuse of unsafe.Pointer

case int32:
	return unsafe.Pointer(uintptr(v)), nil
default:

(401) github.com/kazu/loncha@v0.6.3/list_head/list_head.go:215:29: possible misuse of unsafe.Pointer

}
if unsafe.Pointer(head) == unsafe.Pointer(uintptr(headNext)^1) {
	return nil

(402) github.com/hspan/go-ole@v0.0.0/variant.go:15:21: possible misuse of unsafe.Pointer

	}
	return (*IUnknown)(unsafe.Pointer(uintptr(v.Val)))
}

(403) modernc.org/fontconfig@v1.0.10/lib/fontconfig_linux_386.go:48608:14: possible misuse of unsafe.Pointer

*(*FcChar8)(unsafe.Pointer(save)) = FcChar8(0)
*(*FcChar8)(unsafe.Pointer(last)) = *(*FcChar8)(unsafe.Pointer(cur))
if *(*FcChar8)(unsafe.Pointer(cur)) != 0 {

(404) github.com/KarpelesLab/contexter@v1.0.2/contexter.go:48:12: possible misuse of unsafe.Pointer

ti := (*interfaceHeader)(unsafe.Pointer(&res))
ti.data = unsafe.Pointer(p2)
ti.tab = tab

(405) github.com/iceber/iouring-go@v0.0.0-20230403020409-002cfd2e2a90/mmap.go:55:22: possible misuse of unsafe.Pointer

sq.head = (*uint32)(unsafe.Pointer(sq.ptr + uintptr(params.SQOffset.Head)))
sq.tail = (*uint32)(unsafe.Pointer(sq.ptr + uintptr(params.SQOffset.Tail)))

(406) github.com/tomatome/win@v0.3.1/types.go:4832:39: possible misuse of unsafe.Pointer

func (this *PROPSHEETHEADER_V2) PszbmHeader() string {
	return stringFromUnicode16((*uint16)(unsafe.Pointer(this.union5)))
}

(407) github.com/protolambda/zssz@v0.1.5/types/ssz_ptr.go:87:14: possible misuse of unsafe.Pointer

func (v *SSZPtr) HashTreeRoot(h MerkleFn, p unsafe.Pointer) [32]byte {
	innerPtr := unsafe.Pointer(*(*uintptr)(p))
	return v.elemSSZ.HashTreeRoot(h, innerPtr)

(408) github.com/KarpelesLab/contexter@v1.0.2/contexter.go:59:15: possible misuse of unsafe.Pointer

t := (*itab)(unsafe.Pointer(tab))
return t.inter == expect

(409) github.com/scalingdata/go-ole@v1.2.0/variant.go:23:22: possible misuse of unsafe.Pointer

	}
	return (*IDispatch)(unsafe.Pointer(uintptr(v.Val)))
}

(410) github.com/m3db/stackmurmur3@v1.0.1/murmur32.go:184:20: possible misuse of unsafe.Pointer

for ; p < p1; p += 4 {
	k1 := *(*uint32)(unsafe.Pointer(p))

(411) modernc.org/xrender@v1.0.9/lib/xrender_linux_386.go:14941:18: possible misuse of unsafe.Pointer

(*XPointFixed)(unsafe.Pointer(p)).Fx = INT32((*XPointFixed1)(unsafe.Pointer(first)).Fx)
(*XPointFixed)(unsafe.Pointer(p)).Fy = INT32((*XPointFixed1)(unsafe.Pointer(first)).Fy)
n = npoint

(412) github.com/xlab/linmath@v0.0.0-20220922225318-40b6290c3b40/util.go:85:20: possible misuse of unsafe.Pointer

	const m = 0x7fffffff
	return (*[m]byte)(unsafe.Pointer((*sliceHeader)(unsafe.Pointer(&a)).Data))[:len(a)*2]
}

(413) modernc.org/fontconfig@v1.0.10/lib/fontconfig_linux_386.go:46413:42: possible misuse of unsafe.Pointer

	return (float64(libc.Bool32((*(*FcBool)(unsafe.Pointer(v2 + 4 /* &.u */)) ^ *(*FcBool)(unsafe.Pointer(v1 + 4 /* &.u */))) == 1)))
}

(414) github.com/loov/combiner@v0.1.0/extcombiner/bounded_spinning_uinptr.go:114:41: possible misuse of unsafe.Pointer

for cmp != boundedSpinningUintptrLocked {
	node = (*boundedSpinningUintptrNode)(unsafe.Pointer(cmp))
	if count == c.limit {

(415) github.com/jayanthvn/pure-gobpf@v0.0.0-20230623131354-8d1d959d9e0b/pkg/ebpf_maps/map_loader.go:661:34: possible misuse of unsafe.Pointer

var tempkeyval BPFTrieKeyV6
structPointer = (*BPFTrieKeyV6)(unsafe.Pointer(key))
tempkeyval = *structPointer

(416) github.com/dennwc/btrfs@v0.0.0-20221026161108-3097362dc072/ioctl_h.go:741:37: possible misuse of unsafe.Pointer

for i := 0; i < int(n); i++ {
	info := (*btrfs_ioctl_space_info)(unsafe.Pointer(ptr))
	out[i] = spaceInfo{

(417) github.com/bytedance/go-tagexpr/v2@v2.9.8/tagexpr.go:127:9: possible misuse of unsafe.Pointer

u := ameda.ValueFrom2(&v)
ptr := unsafe.Pointer(u.Pointer())
if ptr == nil {

(418) github.com/spaolacci/murmur3@v1.1.0/murmur32.go:129:20: possible misuse of unsafe.Pointer

for ; p < p1; p += 4 {
	k1 := *(*uint32)(unsafe.Pointer(p))

(419) modernc.org/crt/v2@v2.0.1-alpha.3/crt.go:1265:8: possible misuse of unsafe.Pointer

(*tm)(unsafe.Pointer(localtime)).mday = int32(t.Day())
(*tm)(unsafe.Pointer(localtime)).mon = int32(t.Month())
(*tm)(unsafe.Pointer(localtime)).year = int32(t.Year())

(420) github.com/zly-app/zapp@v1.3.3/pkg/utils/reflect.go:96:19: possible misuse of unsafe.Pointer

	p = reflect.ValueOf(&rv).Elem().Field(1).UnsafeAddr() // &rv.ptr
	p = *(*uintptr)(unsafe.Pointer(p))                    // rv.ptr
}

(421) github.com/dvln/pretty@v0.0.0-20161024040402-00a5f9316993/diff_test.go:120:30: possible misuse of unsafe.Pointer

{
	struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},
	struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},

(422) github.com/ContinuumLLC/godep-go-ole-go-ole@v1.2.0/variant.go:31:42: possible misuse of unsafe.Pointer

}
var safeArray *SafeArray = (*SafeArray)(unsafe.Pointer(uintptr(v.Val)))
return &SafeArrayConversion{safeArray}

(423) github.com/shadialtarsha/go-pcre@v0.0.0-20220904164957-b4f1834ceecc/lib/pcre2_linux_386.go:21601:28: possible misuse of unsafe.Pointer

group = (*Tnamed_group_8)(unsafe.Pointer(ng)).Fnumber
is_dupname = TBOOL((*Tnamed_group_8)(unsafe.Pointer(ng)).Fisdup)

(424) github.com/hspan/go-ole@v0.0.0/variant.go:23:22: possible misuse of unsafe.Pointer

	}
	return (*IDispatch)(unsafe.Pointer(uintptr(v.Val)))
}

(425) github.com/bi-zone/go-ole@v1.2.5/variant.go:15:21: possible misuse of unsafe.Pointer

	}
	return (*IUnknown)(unsafe.Pointer(uintptr(v.Val)))
}

(426) modernc.org/fontconfig@v1.0.10/lib/fontconfig_linux_386.go:46297:32: possible misuse of unsafe.Pointer

if (0101 <= (int32(*(*FcChar8)(unsafe.Pointer(v1_string))))) && ((int32(*(*FcChar8)(unsafe.Pointer(v1_string)))) <= 0132) {
	return (((int32(*(*FcChar8)(unsafe.Pointer(v1_string)))) - 0101) + 0141)
}

(427) github.com/gabe-lee/unsafer@v0.1.1/unsafer.go:244:9: possible misuse of unsafe.Pointer

	x := uintptr(p)
	return unsafe.Pointer(x ^ 0)
}

(428) modernc.org/xcb@v1.0.15/lib/xcb_linux_386.go:78213:48: possible misuse of unsafe.Pointer

(*Xcb_input_delete_device_property_request_t)(unsafe.Pointer(bp /* &xcb_out */)).Fproperty = property
(*Xcb_input_delete_device_property_request_t)(unsafe.Pointer(bp /* &xcb_out */)).Fdevice_id = device_id

(429) github.com/GnawNom/sqlinternals@v0.0.0-20200413232442-a2dcc5655e0f/unsafe.go:125:27: possible misuse of unsafe.Pointer

rowsiPtr := offsetRowsRowsi + (uintptr)((unsafe.Pointer)(rows))
rowsi := *(*driver.Rows)((unsafe.Pointer)(rowsiPtr))
if rowsi == nil {

(430) github.com/bytedance/go-tagexpr/v2@v2.9.8/tagexpr.go:915:12: possible misuse of unsafe.Pointer

if mapKeyStructVM != nil {
	p := unsafe.Pointer(ameda.ValueFrom(derefValue(key)).Pointer())
	if omitNil && p == nil {

(431) github.com/henrylee2cn/go-forceexport@v0.0.0-20200725083357-a18b02135c5b/forceexport.go:48:21: possible misuse of unsafe.Pointer

funcValuePtr := reflect.ValueOf(newFuncVal).FieldByName("ptr").Pointer()
funcPtr := (*Func)(unsafe.Pointer(funcValuePtr))
funcPtr.codePtr = codePtr

(432) github.com/aarbt/murmur3@v0.0.0-20151007181609-ea4cfa3d9c8a/murmur32.go:126:20: possible misuse of unsafe.Pointer

for ; p < p1; p += 4 {
	k1 := *(*uint32)(unsafe.Pointer(p))

(433) github.com/mojzesh/linmath@v0.0.0-20220615094601-759643be23c3/util.go:63:20: possible misuse of unsafe.Pointer

	const m = 0x7fffffff
	return (*[m]byte)(unsafe.Pointer((*sliceHeader)(unsafe.Pointer(&a)).Data))[:len(a)*SizeofVec3]
}

(434) github.com/cznic/memory@v0.0.0-20181122101858-44f9dcde99e8/memory.go:147:18: possible misuse of unsafe.Pointer

}
b := ((*rawmem)(unsafe.Pointer(r)))[:size]
for i := range b {

(435) github.com/hexops/valast@v1.4.3/valast_test.go:475:11: possible misuse of unsafe.Pointer

name:  "unsafe_pointer",
input: unexportedUnsafePointer(uintptr(0xdeadbeef)),
opt:   &Options{PackageName: "other", PackagePath: "github.com/other/other", ExportedOnly: true},

(436) github.com/xiyichan/dm8@v0.0.0-20211213021639-be727be3e136/security/zze.go:137:15: possible misuse of unsafe.Pointer

	p++
	b = (*byte)(unsafe.Pointer(p))
}

(437) github.com/jmigpin/editor@v1.6.0/core/godebug/debug/stringify_test.go:220:28: possible misuse of unsafe.Pointer

a := uintptr(0)
var b *Dummy1 = (*Dummy1)(unsafe.Pointer(a))
runTest1(t, b, "nil")

(438) github.com/iceber/iouring-go@v0.0.0-20230403020409-002cfd2e2a90/mmap.go:58:25: possible misuse of unsafe.Pointer

sq.mask = (*uint32)(unsafe.Pointer(sq.ptr + uintptr(params.SQOffset.RingMask)))
sq.entries = (*uint32)(unsafe.Pointer(sq.ptr + uintptr(params.SQOffset.RingEntries)))
sq.flags = (*uint32)(unsafe.Pointer(sq.ptr + uintptr(params.SQOffset.Flags)))

(439) gitee.com/azhai/fiber-u8l/v2@v2.46.0/internal/go-ole/variant.go:15:21: possible misuse of unsafe.Pointer

	}
	return (*IUnknown)(unsafe.Pointer(uintptr(v.Val)))
}

(440) github.com/mojzesh/linmath@v0.0.0-20220615094601-759643be23c3/util.go:52:20: possible misuse of unsafe.Pointer

	const m = 0x7fffffff
	return (*[m]byte)(unsafe.Pointer((*sliceHeader)(unsafe.Pointer(&a)).Data))[:len(a)*SizeofVec4]
}

(441) code.icb4dc0.de/buildr/wasi-module-sdk-go@v0.0.0-20230524201105-cc52d195017b/mem/unmanaged.go:32:7: possible misuse of unsafe.Pointer

func DataFromPtr(ptr, size uint32) []byte {
	p := unsafe.Pointer(uintptr(ptr))
	return unsafe.Slice((*byte)(p), int(size))

(442) github.com/AbsaOSS/env-binder@v1.0.1/env/bind.go:82:43: possible misuse of unsafe.Pointer

for k, v := range m {
	f := reflect.NewAt(v.fieldValue.Type(), unsafe.Pointer(v.fieldValue.UnsafeAddr())).Elem()
	switch f.Interface().(type) {

(443) github.com/kr/pretty@v0.3.1/diff_test.go:126:30: possible misuse of unsafe.Pointer

struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},
struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(1))},
[]string{`x: 0x0 != 0x1`},

(444) github.com/3JoB/go-json@v0.10.4/decode.go:167:9: possible misuse of unsafe.Pointer

	x := uintptr(p)
	return unsafe.Pointer(x ^ 0)
}

(445) github.com/vedadiyan/sqlparser@v0.0.0-20230215111557-e85f5729af3a/pkg/sqlparser/cached_size.go:737:52: possible misuse of unsafe.Pointer

hmap := reflect.ValueOf(cached.m)
numBuckets := int(math.Pow(2, float64((*(*uint8)(unsafe.Pointer(hmap.Pointer() + uintptr(9)))))))
numOldBuckets := (*(*uint16)(unsafe.Pointer(hmap.Pointer() + uintptr(10))))

(446) github.com/xiyichan/dm8@v0.0.0-20211213021639-be727be3e136/security/zze.go:130:19: possible misuse of unsafe.Pointer

i := 0
for b := (*byte)(unsafe.Pointer(p)); *b != 0; i++ {
	if i > cap(buf) {

(447) github.com/DQNEO/babygo@v0.0.3/src/runtime/runtime.go:139:19: possible misuse of unsafe.Pointer

srcp = (*uint8)(unsafe.Pointer(src + uintptr(i)))
dstp = (*uint8)(unsafe.Pointer(dst + uintptr(i)))
*dstp = *srcp

(448) modernc.org/fontconfig@v1.0.10/lib/fontconfig_linux_386.go:15461:27: possible misuse of unsafe.Pointer

(*FcConfig)(unsafe.Pointer(config)).FconfigFiles = XIA__FcStrSetCreate(tls)
if !(!(int32((*FcConfig)(unsafe.Pointer(config)).FconfigFiles) != 0)) {
	goto __3

(449) github.com/ecadlabs/pretty@v0.0.0-20230412123216-0f3d25fb750b/diff_test.go:126:30: possible misuse of unsafe.Pointer

struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},
struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(1))},
[]string{`x: 0x0 != 0x1`},

(450) github.com/tursom/GoCollections@v0.3.10/lang/Hash.go:20:30: possible misuse of unsafe.Pointer

remain -= 4
hash = hash*31 ^ *(*int32)(unsafe.Pointer(p))
p += 4

(451) github.com/davecheney/badidea@v1.0.0/badidea.go:9:12: possible misuse of unsafe.Pointer

func GoroutineID() int64 {
	m := (*m)(unsafe.Pointer(runtime_getm()))
	g := m.curg

(452) github.com/mojzesh/linmath@v0.0.0-20220615094601-759643be23c3/util.go:96:20: possible misuse of unsafe.Pointer

	const m = 0x7fffffff
	return (*[m]byte)(unsafe.Pointer((*sliceHeader)(unsafe.Pointer(&a)).Data))[:len(a)*4]
}

(453) github.com/neilotoole/jsoncolor@v0.6.0/codec.go:795:9: possible misuse of unsafe.Pointer

	x := uintptr(p)
	return unsafe.Pointer(x ^ 0)
}

(454) github.com/arnehormann/sqlinternals@v0.0.0-20170823191638-d9cb0cffad4e/unsafe.go:125:27: possible misuse of unsafe.Pointer

rowsiPtr := offsetRowsRowsi + (uintptr)((unsafe.Pointer)(rows))
rowsi := *(*driver.Rows)((unsafe.Pointer)(rowsiPtr))
if rowsi == nil {

(455) github.com/iceber/iouring-go@v0.0.0-20230403020409-002cfd2e2a90/mmap.go:85:22: possible misuse of unsafe.Pointer

cq.head = (*uint32)(unsafe.Pointer(cq.ptr + uintptr(params.CQOffset.Head)))
cq.tail = (*uint32)(unsafe.Pointer(cq.ptr + uintptr(params.CQOffset.Tail)))

(456) github.com/goki/ki@v1.1.11/ki/node.go:1011:17: possible misuse of unsafe.Pointer

for _, fo := range foffs {
	fn := (*Node)(unsafe.Pointer(op + fo))
	fun(fn.This(), level, data)

(457) modernc.org/crt/v2@v2.0.1-alpha.3/crt.go:929:18: possible misuse of unsafe.Pointer

// }
fd := *(*int32)(unsafe.Pointer(uintptr(stream)))
switch fd {

(458) github.com/dvln/pretty@v0.0.0-20161024040402-00a5f9316993/diff_test.go:121:30: possible misuse of unsafe.Pointer

struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},
struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},
nil,

(459) github.com/urso/go-structform@v0.0.2/gotype/unfold_struct.go:170:14: possible misuse of unsafe.Pointer

fieldAddr := uintptr(structPtr) + field.offset
fieldPtr := unsafe.Pointer(fieldAddr)
field.initState(ctx, fieldPtr)

(460) github.com/arnehormann/sqlinternals@v0.0.0-20170823191638-d9cb0cffad4e/unsafe.go:113:31: possible misuse of unsafe.Pointer

rowsPtr := (uintptr)((unsafe.Pointer)(v)) + offsetRowRows
unsafeRows := *(**sql.Rows)((unsafe.Pointer)(rowsPtr))
if unsafeRows == nil {

(461) github.com/niubaoshu/gotiny@v0.0.3/gotiny_test.go:330:13: possible misuse of unsafe.Pointer

srcp[i] = unsafe.Pointer(reflect.ValueOf(&srci[i]).Elem().InterfaceData()[1])
retp[i] = unsafe.Pointer(reflect.ValueOf(&reti[i]).Elem().InterfaceData()[1])

(462) gorgonia.org/gorgonia@v0.9.17/values.go:153:19: possible misuse of unsafe.Pointer

case tensor.Float64:
	retVal = (*F64)(unsafe.Pointer(mem.Uintptr()))
case tensor.Float32:

(463) github.com/andeya/ameda@v1.5.3/value.go:197:21: possible misuse of unsafe.Pointer

func uintptrElem(ptr uintptr) uintptr {
	return *(*uintptr)(unsafe.Pointer(ptr))
}

(464) github.com/vela-security/vela-public@v1.1.11/lua/anydata.go:269:28: possible misuse of unsafe.Pointer

case reflect.Int32:
	return LNumber(*(*int32)(unsafe.Pointer(ad.ptr + field.Offset)))
case reflect.Int64:

(465) github.com/Ptt-official-app/go-bbs@v0.12.0/cache/systemvshm_unix.go:20:75: possible misuse of unsafe.Pointer

func shmat(shmid int, shmaddr uintptr, shmflg int) (uintptr, error) {
	r1, _, err := syscall.Syscall(syscall.SYS_SHMAT, uintptr(shmid), uintptr(unsafe.Pointer(shmaddr)), uintptr(shmflg))
	if err != 0 {

(466) github.com/gopacket/gopacket@v1.1.0/afpacket/afpacket.go:462:24: possible misuse of unsafe.Pointer

position := uintptr(h.rawring) + uintptr(h.opts.frameSize*h.offset*h.opts.framesPerBlock)
h.v3 = initV3Wrapper(unsafe.Pointer(position))
return &h.v3

(467) github.com/remoteit/go-ole@v1.2.7/variant.go:15:21: possible misuse of unsafe.Pointer

	}
	return (*IUnknown)(unsafe.Pointer(uintptr(v.Val)))
}

(468) github.com/kkkunny/containers@v0.0.0-20230425014319-2cd762fc116c/hashmap/hashers.go:17:17: possible misuse of unsafe.Pointer

for i := uintptr(0); i < size; i++ {
	b := *(*byte)(unsafe.Pointer(ptr + i))
	_, _ = h.Write([]byte{b})

(469) github.com/wzzhu/tensor@v0.9.24/dense_apply_test.go:50:10: possible misuse of unsafe.Pointer

case UnsafePointer:
	return unsafe.Pointer(uintptr(0xdeadbeef))
}

(470) github.com/oakmound/oak/v4@v4.1.0/shiny/driver/x11driver/shm_linux_ipc.go:38:13: possible misuse of unsafe.Pointer

if errno2 != 0 {
	return 0, unsafe.Pointer(uintptr(0)), fmt.Errorf("shmctl: %v", errno2)
}

(471) modernc.org/xdmcp@v1.0.17/lib/xdmcp_linux_386.go:7630:36: possible misuse of unsafe.Pointer

}
for i = 0; i < int32((*X_ARRAY32)(unsafe.Pointer(array)).Flength); i++ {
	if !(XXdmcpWriteCARD32(tls, buffer, uint32(*(*CARD32)(unsafe.Pointer((*X_ARRAY32)(unsafe.Pointer(array)).Fdata + uintptr(i)*4)))) != 0) {

(472) go4.org/intern@v0.0.0-20230525184215-6c62f75575cb/intern.go:110:16: possible misuse of unsafe.Pointer

} else if addr, ok := valMap[k]; ok {
	v = (*Value)((unsafe.Pointer)(addr))
	v.resurrected = true

(473) github.com/movsb/taorm@v0.0.0-20201209183410-91bafb0b22a6/taorm/registry.go:44:10: possible misuse of unsafe.Pointer

func (s *_StructInfo) addrOf(out interface{}, field _FieldInfo) interface{} {
	addr := unsafe.Pointer(s.baseOf(out) + field.offset)
	return reflect.NewAt(field._type, addr).Interface()

(474) gitee.com/quant1x/gox@v1.7.6/api/channel.go:26:24: possible misuse of unsafe.Pointer

cptr += unsafe.Sizeof(uint(0)) * 2
cptr += unsafe.Sizeof(unsafe.Pointer(uintptr(0)))
cptr += unsafe.Sizeof(uint16(0))

(475) github.com/cznic/strutil@v0.0.0-20181122101858-275e90344537/all_test.go:183:18: possible misuse of unsafe.Pointer

	Uintptr:       uintptr(99),
	UnsafePointer: unsafe.Pointer(uintptr(0x12345678)),
}

(476) modernc.org/fontconfig@v1.0.10/lib/fontconfig_linux_386.go:16996:69: possible misuse of unsafe.Pointer

(*X_FcValueList)(unsafe.Pointer(last)).Fnext = *(*FcValueListPtr)(unsafe.Pointer(prev))
*(*FcValueListPtr)(unsafe.Pointer(prev)) = new

(477) github.com/ZaytsveDmitriy/ole@v1.2.9/variant.go:23:22: possible misuse of unsafe.Pointer

	}
	return (*IDispatch)(unsafe.Pointer(uintptr(v.Val)))
}

(478) github.com/xlab/linmath@v0.0.0-20220922225318-40b6290c3b40/util.go:74:20: possible misuse of unsafe.Pointer

	const m = 0x7fffffff
	return (*[m]byte)(unsafe.Pointer((*sliceHeader)(unsafe.Pointer(&a)).Data))[:len(a)*SizeofVec2]
}

(479) github.com/seancfoley/bintree@v1.2.1/tree/bintreenode.go:155:9: possible misuse of unsafe.Pointer

	ptr := uintptr(p)
	return unsafe.Pointer(ptr ^ 0)
}

(480) github.com/iceber/iouring-go@v0.0.0-20230403020409-002cfd2e2a90/mmap.go:87:22: possible misuse of unsafe.Pointer

cq.tail = (*uint32)(unsafe.Pointer(cq.ptr + uintptr(params.CQOffset.Tail)))
cq.mask = (*uint32)(unsafe.Pointer(cq.ptr + uintptr(params.CQOffset.RingMask)))
cq.entries = (*uint32)(unsafe.Pointer(cq.ptr + uintptr(params.CQOffset.RingEntries)))

(481) github.com/movsb/taorm@v0.0.0-20201209183410-91bafb0b22a6/taorm/registry.go:39:10: possible misuse of unsafe.Pointer

func (s *_StructInfo) valueOf(out interface{}, field _FieldInfo) reflect.Value {
	addr := unsafe.Pointer(s.baseOf(out) + field.offset)
	return reflect.NewAt(field._type, addr).Elem()

(482) vitess.io/vitess@v0.16.2/go/tools/sizegen/integration/cached_size.go:140:52: possible misuse of unsafe.Pointer

hmap := reflect.ValueOf(cached.field1)
numBuckets := int(math.Pow(2, float64((*(*uint8)(unsafe.Pointer(hmap.Pointer() + uintptr(9)))))))
numOldBuckets := (*(*uint16)(unsafe.Pointer(hmap.Pointer() + uintptr(10))))

(483) github.com/cilium/ebpf@v0.10.0/map.go:800:29: possible misuse of unsafe.Pointer

// Provide an invalid value pointer to prevent a copy on the kernel side.
valuePtr := sys.NewPointer(unsafe.Pointer(^uintptr(0)))
randKey := make([]byte, int(m.keySize))

(484) github.com/go-ole/go-ole@v1.2.6/variant.go:33:42: possible misuse of unsafe.Pointer

}
var safeArray *SafeArray = (*SafeArray)(unsafe.Pointer(uintptr(v.Val)))
return &SafeArrayConversion{safeArray}

(485) github.com/qiniu/dyn@v1.3.0/jsonext/jsonext.go:28:26: possible misuse of unsafe.Pointer

sh := *(*reflect.StringHeader)(unsafe.Pointer(&data))
arr := (*[1 << 30]byte)(unsafe.Pointer(sh.Data))
return Unmarshal(arr[:sh.Len], v)

(486) github.com/fengyoulin/shm@v0.0.0-20200305015033-287e184bdf0a/map.go:448:24: possible misuse of unsafe.Pointer

h.Data = a + 1
h.Len = int(*(*uint8)(unsafe.Pointer(a)))
return

(487) github.com/shadialtarsha/go-pcre@v0.0.0-20220904164957-b4f1834ceecc/lib/pcre2_linux_386.go:14814:33: possible misuse of unsafe.Pointer

}
top_nest = (*Tcompile_block_8)(unsafe.Pointer(cb)).Fstart_workspace
goto __450

(488) github.com/gozelle/pretty@v0.3.1/diff_test.go:121:30: possible misuse of unsafe.Pointer

struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},
struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},
nil,

(489) github.com/mundipagg/tracer-splunk-writer@v1.0.6/json/encoder/map_test.go:65:26: possible misuse of unsafe.Pointer

pointer = reflect.ValueOf(&input).Pointer()
is.True(subject.IsEmpty(unsafe.Pointer(pointer)))
is.True(subject.IsEmpty(nil))

(490) github.com/wdvxdr1123/go-silk@v0.0.0-20210316130616-d47b553def60/sdk/skype_silk_sdk_32.go:11380:238: possible misuse of unsafe.Pointer

}
return (int16((((((((*(*int32)(unsafe.Pointer((psDD + 256 /* &.Xq_Q10 */) + uintptr(last_smple_idx)*4))) >> 16) * (int32(int16(*(*int32)(unsafe.Pointer((psDD + 640 /* &.Gain_Q16 */) + uintptr(last_smple_idx)*4)))))) + ((((*(*int32)(unsafe.Pointer((psDD + 256 /* &.Xq_Q10 */) + uintptr(last_smple_idx)*4))) & 0x0000FFFF) * (int32(int16(*(*int32)(unsafe.Pointer((psDD + 640 /* &.Gain_Q16 */) + uintptr(last_smple_idx)*4)))))) >> 16)) + ((*(*int32)(unsafe.Pointer((psDD + 256 /* &.Xq_Q10 */) + uintptr(last_smple_idx)*4))) * (func() int32 {
	if (16) == 1 {

(491) github.com/cybriq/gotiny@v0.0.5/decEngine.go:127:14: possible misuse of unsafe.Pointer

for i := 0; i < l; i++ {
	eEng(d, unsafe.Pointer(header.Data+uintptr(i)*size))
}

(492) github.com/gofiber/fiber/v2@v2.47.0/internal/go-ole/variant.go:15:21: possible misuse of unsafe.Pointer

	}
	return (*IUnknown)(unsafe.Pointer(uintptr(v.Val)))
}

(493) github.com/ContinuumLLC/godep-go-ole-go-ole@v1.2.0/variant.go:23:22: possible misuse of unsafe.Pointer

	}
	return (*IDispatch)(unsafe.Pointer(uintptr(v.Val)))
}

(494) github.com/dolthub/maphash@v0.1.0/runtime.go:55:9: possible misuse of unsafe.Pointer

	x := uintptr(p)
	return unsafe.Pointer(x ^ 0)
}

(495) modernc.org/xau@v1.0.16/lib/xau_linux_386.go:5163:37: possible misuse of unsafe.Pointer

// case a 0 deadtime to force lock removal
if (dead == 0) || ((now - (*Stat)(unsafe.Pointer(bp+2076 /* &statb */)).Fst_ctim.Ftv_sec) > dead) {
	libc.Xremove(tls, bp+24 /* &creat_name[0] */)

(496) modernc.org/fontconfig@v1.0.10/lib/fontconfig_linux_386.go:35476:126: possible misuse of unsafe.Pointer

{Fplatform_id: FT_UShort(TT_PLATFORM_MICROSOFT), Flanguage_id: FT_UShort(TT_MS_LANGID_KANURI_NIGERIA), Flang: *(*[8]int8)(unsafe.Pointer(ts + 4768 /* "kau\x00\x00\x00\x00" */))},
{Fplatform_id: FT_UShort(TT_PLATFORM_MICROSOFT), Flanguage_id: FT_UShort(TT_MS_LANGID_GUARANI_PARAGUAY), Flang: *(*[8]int8)(unsafe.Pointer(ts + 4432 /* "gn\x00\x00\x00\x00\x00" */))},
{Fplatform_id: FT_UShort(TT_PLATFORM_MICROSOFT), Flanguage_id: FT_UShort(TT_MS_LANGID_HAWAIIAN_UNITED_STATES), Flang: *(*[8]int8)(unsafe.Pointer(ts + 4776 /* "haw\x00\x00\x00\x00" */))},

(497) github.com/chunqian/pretty@v0.0.0-20200305075802-e57086a8d0c4/diff_test.go:126:30: possible misuse of unsafe.Pointer

struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(0))},
struct{ x unsafe.Pointer }{unsafe.Pointer(uintptr(1))},
[]string{`x: 0x0 != 0x1`},

(498) modernc.org/xrender@v1.0.9/lib/xrender_linux_386.go:13636:80: possible misuse of unsafe.Pointer

req = x11.X_XGetRequest(tls, dpy, uint8(X_RenderCreatePicture), uint32(Sz_xRenderCreatePictureReq))
(*XRenderCreatePictureReq)(unsafe.Pointer(req)).FreqType = CARD8((*XExtCodes)(unsafe.Pointer((*XRenderExtDisplayInfo)(unsafe.Pointer(info)).Fcodes)).Fmajor_opcode)
(*XRenderCreatePictureReq)(unsafe.Pointer(req)).FrenderReqType = CARD8(X_RenderCreatePicture)

(499) github.com/mymmsc/gox@v1.3.33/encoding/binary/cstruct/buffer.go:521:25: possible misuse of unsafe.Pointer

for i := 0; i < ln; i++ {
	sv := (structPointer)(unsafe.Pointer(sliceHeader.Data + uintptr(i*itemsize)))
	o.enc_struct(p.sprop, sv)

(500) github.com/oakmound/oak/v4@v4.1.0/shiny/driver/x11driver/shm_linux_ipc.go:35:13: possible misuse of unsafe.Pointer

if errno1 != 0 {
	return 0, unsafe.Pointer(uintptr(0)), fmt.Errorf("shmat: %v", errno1)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment