mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime, syscall: add calls to msan functions
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>
This commit is contained in:
parent
c279250946
commit
73f329f472
15 changed files with 132 additions and 0 deletions
|
|
@ -364,6 +364,9 @@ func stackalloc(n uint32) (stack, []stkbar) {
|
|||
if raceenabled {
|
||||
racemalloc(v, uintptr(n))
|
||||
}
|
||||
if msanenabled {
|
||||
msanmalloc(v, uintptr(n))
|
||||
}
|
||||
if stackDebug >= 1 {
|
||||
print(" allocated ", v, "\n")
|
||||
}
|
||||
|
|
@ -393,6 +396,9 @@ func stackfree(stk stack, n uintptr) {
|
|||
}
|
||||
return
|
||||
}
|
||||
if msanenabled {
|
||||
msanfree(v, n)
|
||||
}
|
||||
if stackCache != 0 && n < _FixedStack<<_NumStackOrders && n < _StackCacheSize {
|
||||
order := uint8(0)
|
||||
n2 := n
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue