[llvm-bugs] [Bug 32628] New: When using C-bindings, on x86_64 ELF, fails to generate the correct instruction for external call
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Apr 11 10:55:28 PDT 2017
http://bugs.llvm.org/show_bug.cgi?id=32628
Bug ID: 32628
Summary: When using C-bindings, on x86_64 ELF, fails to
generate the correct instruction for external call
Product: libraries
Version: 4.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: OrcJIT
Assignee: unassignedbugs at nondot.org
Reporter: vlad at cloudflare.com
CC: llvm-bugs at lists.llvm.org
Created attachment 18271
--> http://bugs.llvm.org/attachment.cgi?id=18271&action=edit
Code to reproduce the problem
Debian 8, using llvm 4.0, as well as the trunk, when running the attached code
I get a segfault.
It looks like the generated call is of the near, ip-relative type, and when the
symbol is resolved, the offset is incorrect, as it can't fit into 32-bit
allowed for that type of instruction.
$ clang -g min.c `llvm-config --cflags --ldflags --system-libs --libs core
orcjit native` -rdynamic -lstdc++ -o min
$ gdb min
$ (gdb) run
$ Program received signal SIGSEGV, Segmentation fault.
$ 0x00007ffff7ff0001 in ?? ()
$ (gdb) x/i 0x00007ffff7ff0001
$ => 0x7ffff7ff0001: callq 0x800000edbd50
--
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/20170411/cda27487/attachment.html>
More information about the llvm-bugs
mailing list