[llvm] [ASan][AMDGPU] Fix Assertion Failure. (PR #78710)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 23 07:31:26 PST 2024
================
@@ -1255,7 +1255,8 @@ void AddressSanitizer::instrumentMemIntrinsic(MemIntrinsic *MI) {
InstrumentationIRBuilder IRB(MI);
if (isa<MemTransferInst>(MI)) {
IRB.CreateCall(isa<MemMoveInst>(MI) ? AsanMemmove : AsanMemcpy,
- {MI->getOperand(0), MI->getOperand(1),
+ {IRB.CreateAddrSpaceCast(MI->getOperand(0), PtrTy),
+ IRB.CreateAddrSpaceCast(MI->getOperand(1), PtrTy),
----------------
b-sumner wrote:
> It will be needed for any memory intrinsic
Logically we should never see an attempt to set memory with a pointer to constant memory, but I think we need to handle memset otherwise.
https://github.com/llvm/llvm-project/pull/78710
More information about the llvm-commits
mailing list