...
Source file
src/runtime/msan.go
Documentation: runtime
1
2
3
4
5
6
7 package runtime
8
9 import (
10 "unsafe"
11 )
12
13
14
15 func MSanRead(addr unsafe.Pointer, len int) {
16 msanread(addr, uintptr(len))
17 }
18
19 func MSanWrite(addr unsafe.Pointer, len int) {
20 msanwrite(addr, uintptr(len))
21 }
22
23
24 const msanenabled = true
25
26
27
28
29
30
31
32
33 func msanread(addr unsafe.Pointer, sz uintptr) {
34 gp := getg()
35 if gp == nil || gp.m == nil || gp == gp.m.g0 || gp == gp.m.gsignal {
36 return
37 }
38 domsanread(addr, sz)
39 }
40
41
42 func domsanread(addr unsafe.Pointer, sz uintptr)
43
44
45 func msanwrite(addr unsafe.Pointer, sz uintptr)
46
47
48 func msanmalloc(addr unsafe.Pointer, sz uintptr)
49
50
51 func msanfree(addr unsafe.Pointer, sz uintptr)
52
53
54 func msanmove(dst, src unsafe.Pointer, sz uintptr)
55
56
57
58
59
60
61
62
63
View as plain text