summaryrefslogtreecommitdiffstats
path: root/src/syscall/asan.go
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/syscall/asan.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/syscall/asan.go b/src/syscall/asan.go
new file mode 100644
index 0000000..eff3078
--- /dev/null
+++ b/src/syscall/asan.go
@@ -0,0 +1,22 @@
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build asan
+
+package syscall
+
+import (
+ "runtime"
+ "unsafe"
+)
+
+const asanenabled = true
+
+func asanRead(addr unsafe.Pointer, len int) {
+ runtime.ASanRead(addr, len)
+}
+
+func asanWrite(addr unsafe.Pointer, len int) {
+ runtime.ASanWrite(addr, len)
+}