[llvm-bugs] [Bug 41966] New: Mismatching signature on __tgt_target calls for 32bit hosts
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue May 21 08:25:09 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=41966
Bug ID: 41966
Summary: Mismatching signature on __tgt_target calls for 32bit
hosts
Product: OpenMP
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Runtime Library
Assignee: unassignedbugs at nondot.org
Reporter: bucyril at ee.ethz.ch
CC: llvm-bugs at lists.llvm.org
The signature used for the __tgt_target call used by Clang is:
int32_t __tgt_target(int64_t device_id, void *host_ptr, int32_t arg_num, void
**args_base, void **args, size_t *arg_sizes, int64_t *arg_types);
In CGOpenMPRuntime.cpp, line 2235:
https://github.com/llvm-mirror/clang/blob/1353fe814c52fd2eb0324cea1099ed79703896ff/lib/CodeGen/CGOpenMPRuntime.cpp#L2235
The signature used in libomptarget is:
int32_t __tgt_target(int64_t device_id, void *host_ptr, int32_t arg_num, void
**args_base, void **args, int64_t *arg_sizes, int64_t *arg_types);
in interface.cpp, line 217:
https://github.com/llvm-mirror/openmp/blob/665d5c5112ab6ee1cba56733ec3a1b37e86aa55b/libomptarget/src/interface.cpp#L217
These differ for 32bit hosts in the argument `arg_sizes`, because Clang
generates `size_t*`, while libomptarget expects `int64_t*`. This results in
unreasonably large allocations and a subsequent segfault when more than one
argument is used for the offloaded call.
--
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/20190521/0a2cb6dc/attachment.html>
More information about the llvm-bugs
mailing list