File tree 3 files changed +11
-9
lines changed
3 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 1
- // Copyright 2023 The Go Authors. All rights reserved.
1
+ // Copyright 2024 The Go Authors. All rights reserved.
2
2
// Use of this source code is governed by a BSD-style
3
3
// license that can be found in the LICENSE file.
4
4
5
- /*
6
- Package msan contains helper functions for manually instrumenting code
7
- for the memory sanitizer.
8
-
9
- This package exports the private msan routines in runtime unconditionally
10
- but without the "msan" build tag they are no-ops.
11
- */
5
+ // Package msan contains helper functions for manually instrumenting code
6
+ // for the memory sanitizer.
7
+ // This package exports the private msan routines in runtime unconditionally
8
+ // but without the "msan" build tag they are no-ops.
12
9
package msan
Original file line number Diff line number Diff line change 1
- // Copyright 2023 The Go Authors. All rights reserved.
1
+ // Copyright 2024 The Go Authors. All rights reserved.
2
2
// Use of this source code is governed by a BSD-style
3
3
// license that can be found in the LICENSE file.
4
4
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ const msanenabled = true
29
29
// anyhow for values on the stack. Just ignore msanread when running
30
30
// on the system stack. The other msan functions are fine.
31
31
//
32
+ //go:linkname msanread
32
33
//go:nosplit
33
34
func msanread (addr unsafe.Pointer , sz uintptr ) {
34
35
gp := getg ()
@@ -41,15 +42,19 @@ func msanread(addr unsafe.Pointer, sz uintptr) {
41
42
//go:noescape
42
43
func domsanread (addr unsafe.Pointer , sz uintptr )
43
44
45
+ //go:linkname msanwrite
44
46
//go:noescape
45
47
func msanwrite (addr unsafe.Pointer , sz uintptr )
46
48
49
+ //go:linkname msanmalloc
47
50
//go:noescape
48
51
func msanmalloc (addr unsafe.Pointer , sz uintptr )
49
52
53
+ //go:linkname msanfree
50
54
//go:noescape
51
55
func msanfree (addr unsafe.Pointer , sz uintptr )
52
56
57
+ //go:linkname msanmove
53
58
//go:noescape
54
59
func msanmove (dst , src unsafe.Pointer , sz uintptr )
55
60
You can’t perform that action at this time.
0 commit comments