https://bugs.llvm.org/show_bug.cgi?id=50075
Bug ID: 50075
Summary: Assertion failure when emitting call to
__dfsan_mem_transfer_callback
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Miscellaneous Instrumentation passes
Assignee: unassignedb...@nondot.org
Reporter: elia.f.gere...@gmail.com
CC: llvm-bugs@lists.llvm.org
Created attachment 24784
--> https://bugs.llvm.org/attachment.cgi?id=24784&action=edit
Bitcode reproducer
When processing the following function, DFSan triggers the assertion "Calling a
function with a bad signature!" in `DFSanVisitor::visitMemTransferInst`:
```
; Function Attrs: nounwind uwtable
define dso_local i32 @b() local_unnamed_addr #0 {
entry:
call void @llvm.memcpy.p0i8.p0i8.i32(
i8* nonnull align 16 dereferenceable(5) bitcast ([10 x i32]* @a to i8*),
i8* nonnull align 1 dereferenceable(5) getelementptr inbounds ([5 x i8], [5
x i8]* @.str.1, i64 0, i64 0),
i32 5,
i1 false)
ret i32 undef
}
```
The problem is due to the fact that the length of the
`llvm.memcpy.p0i8.p0i8.i32` intrinsic, which is an `i32`, is passed to the
`__dfsan_mem_transfer_callback` function, which instead takes an `i64`.
The bug is reproducible with the bitcode file attached using the following
command:
```
opt -dfsan -dfsan-event-callbacks minigzip_opt.bc -disable-output
```
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs