...
Source file
src/runtime/asan.go
Documentation: runtime
1
2
3
4
5
6
7 package runtime
8
9 import (
10 "unsafe"
11 )
12
13
14 func ASanRead(addr unsafe.Pointer, len int) {
15 sp := getcallersp()
16 pc := getcallerpc()
17 doasanread(addr, uintptr(len), sp, pc)
18 }
19
20 func ASanWrite(addr unsafe.Pointer, len int) {
21 sp := getcallersp()
22 pc := getcallerpc()
23 doasanwrite(addr, uintptr(len), sp, pc)
24 }
25
26
27 const asanenabled = true
28
29
30
31
32
33
34 func asanread(addr unsafe.Pointer, sz uintptr) {
35 sp := getcallersp()
36 pc := getcallerpc()
37 doasanread(addr, sz, sp, pc)
38 }
39
40
41
42 func asanwrite(addr unsafe.Pointer, sz uintptr) {
43 sp := getcallersp()
44 pc := getcallerpc()
45 doasanwrite(addr, sz, sp, pc)
46 }
47
48
49 func doasanread(addr unsafe.Pointer, sz, sp, pc uintptr)
50
51
52 func doasanwrite(addr unsafe.Pointer, sz, sp, pc uintptr)
53
54
55 func asanunpoison(addr unsafe.Pointer, sz uintptr)
56
57
58 func asanpoison(addr unsafe.Pointer, sz uintptr)
59
60
61 func asanregisterglobals(addr unsafe.Pointer, n uintptr)
62
63
64
65
66
67
68
69
70
View as plain text