mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
[dfsan] Fix Len argument type in call to __dfsan_mem_transfer_callback
This patch is supposed to solve: https://bugs.llvm.org/show_bug.cgi?id=50075 The function `__dfsan_mem_transfer_callback` takes a `Len` argument of type `i64`; however, when processing a `MemTransferInst` such as `llvm.memcpy.p0i8.p0i8.i32`, the `len` argument has type `i32`. In order to make the type of `len` compatible with the one of the callback argument, this change zero-extends it when necessary. Reviewed By: stephan.yichao.zhao, gbalats Differential Revision: https://reviews.llvm.org/D101048
This commit is contained in:
parent
5320e959d4
commit
99885567cb
@ -2915,7 +2915,8 @@ void DFSanVisitor::visitMemTransferInst(MemTransferInst &I) {
|
||||
}
|
||||
if (ClEventCallbacks) {
|
||||
IRB.CreateCall(DFSF.DFS.DFSanMemTransferCallbackFn,
|
||||
{RawDestShadow, I.getLength()});
|
||||
{RawDestShadow,
|
||||
IRB.CreateZExtOrTrunc(I.getLength(), DFSF.DFS.IntptrTy)});
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user