aboutsummaryrefslogtreecommitdiff
path: root/src/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime')
-rw-r--r--src/runtime/msan/msan.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/runtime/msan/msan.go b/src/runtime/msan/msan.go
index 8d4471b816..7a30581de7 100644
--- a/src/runtime/msan/msan.go
+++ b/src/runtime/msan/msan.go
@@ -13,8 +13,6 @@ package msan
#include <stdint.h>
#include <sanitizer/msan_interface.h>
-extern void __msan_memmove(void*, const void*, uintptr_t);
-
void __msan_read_go(void *addr, uintptr_t sz) {
__msan_check_mem_is_initialized(addr, sz);
}
@@ -32,7 +30,11 @@ void __msan_free_go(void *addr, uintptr_t sz) {
}
void __msan_memmove_go(void *to, const void *from, uintptr_t sz) {
- __msan_memmove(to, from, sz);
+ // Note: don't use msan_memmove, as it actually does
+ // the move. We do the move ourselves, so it isn't necessary.
+ // Also, it clobbers the target before we issue the write
+ // barrier, which causes pointers to get lost. See issue 76138.
+ __msan_copy_shadow(to, from, sz);
}
*/
import "C"