mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 18:24:23 +00:00
[msan] Fix handling of byval arguments with large alignment.
MSan param-tls slots are 8-byte aligned. This change clips alignment of memcpy into param-tls to 8. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220101 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -2329,7 +2329,8 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
|
||||
assert(A->getType()->isPointerTy() &&
|
||||
"ByVal argument is not a pointer!");
|
||||
Size = MS.DL->getTypeAllocSize(A->getType()->getPointerElementType());
|
||||
unsigned Alignment = CS.getParamAlignment(i + 1);
|
||||
unsigned ParamAlignment = CS.getParamAlignment(i + 1);
|
||||
unsigned Alignment = std::min(ParamAlignment, kShadowTLSAlignment);
|
||||
Store = IRB.CreateMemCpy(ArgShadowBase,
|
||||
getShadowPtr(A, Type::getInt8Ty(*MS.C), IRB),
|
||||
Size, Alignment);
|
||||
|
Reference in New Issue
Block a user