#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);
}
}
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"