[llvm-bugs] [Bug 50075] New: Assertion failure when emitting call to __dfsan_mem_transfer_callback
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Apr 22 04:05:48 PDT 2021
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: unassignedbugs at nondot.org
Reporter: elia.f.geretto at gmail.com
CC: llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210422/a07b756a/attachment.html>
More information about the llvm-bugs
mailing list