]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: define dummy msanmove
authorCherry Zhang <cherryyz@google.com>
Fri, 22 Jan 2021 21:35:21 +0000 (16:35 -0500)
committerCherry Zhang <cherryyz@google.com>
Fri, 22 Jan 2021 22:51:23 +0000 (22:51 +0000)
In msan mode we instrument code with msan* functions, including
msanmove. In some configurations the code is instrumented by the
compiler but msan is not actually linked in, so we need dummy
definitions for those functions so the program links. msanmove is
newly added in CL 270859 but a dummy definition in msan0.go was
not added, causing link failures. Add it.

Change-Id: I91f8e749919f57f1182e90b43412b0282cf4767c
Reviewed-on: https://go-review.googlesource.com/c/go/+/285955
Trust: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/runtime/msan0.go

index 117c5e5789cb51e9224a58ec14bebbebb86bbe15..374d13f30b516978a1154ea7e932f55a9d1af492 100644 (file)
@@ -16,7 +16,8 @@ const msanenabled = false
 
 // Because msanenabled is false, none of these functions should be called.
 
-func msanread(addr unsafe.Pointer, sz uintptr)   { throw("msan") }
-func msanwrite(addr unsafe.Pointer, sz uintptr)  { throw("msan") }
-func msanmalloc(addr unsafe.Pointer, sz uintptr) { throw("msan") }
-func msanfree(addr unsafe.Pointer, sz uintptr)   { throw("msan") }
+func msanread(addr unsafe.Pointer, sz uintptr)     { throw("msan") }
+func msanwrite(addr unsafe.Pointer, sz uintptr)    { throw("msan") }
+func msanmalloc(addr unsafe.Pointer, sz uintptr)   { throw("msan") }
+func msanfree(addr unsafe.Pointer, sz uintptr)     { throw("msan") }
+func msanmove(dst, src unsafe.Pointer, sz uintptr) { throw("msan") }