mirror of
https://github.com/golang/go
synced 2024-10-05 20:31:20 -06:00
73f329f472
Add explicit memory sanitizer instrumentation to the runtime and syscall packages. The compiler does not instrument the runtime package. It does instrument the syscall package, but we need to add a couple of cases that it can't see. Change-Id: I2d66073f713fe67e33a6720460d2bb8f72f31394 Reviewed-on: https://go-review.googlesource.com/16164 Reviewed-by: David Crawshaw <crawshaw@golang.org>
23 lines
410 B
Go
23 lines
410 B
Go
// Copyright 2015 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.
|
|
|
|
// +build msan
|
|
|
|
package syscall
|
|
|
|
import (
|
|
"runtime"
|
|
"unsafe"
|
|
)
|
|
|
|
const msanenabled = true
|
|
|
|
func msanRead(addr unsafe.Pointer, len int) {
|
|
runtime.MSanRead(addr, len)
|
|
}
|
|
|
|
func msanWrite(addr unsafe.Pointer, len int) {
|
|
runtime.MSanWrite(addr, len)
|
|
}
|