[msan] Fix invalid origin copying.
Origin copying may destroy valid origin info. This is caused by __msan_copy_origin widening the address range to the nearest 4-byte aligned addresses both on the left and on the right. If the target buffer is uninitialized and the source is fully initialized, this will result in overriding valid origin of target buffer with stale (possibly 0) origin of the source buffer. With this change the widened origin is copied only if corresponding shadow values are non zero. llvm-svn: 193338
Loading
Please register or sign in to comment