[llvm-bugs] [Bug 32628] New: When using C-bindings, on x86_64 ELF, fails to generate the correct instruction for external call
llvm-bugs at lists.llvm.org
Tue Apr 11 10:55:28 PDT 2017
Bug ID: 32628
Summary: When using C-bindings, on x86_64 ELF, fails to
generate the correct instruction for external call
Assignee: unassignedbugs at nondot.org
Reporter: vlad at cloudflare.com
CC: llvm-bugs at lists.llvm.org
Created attachment 18271
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...
More information about the llvm-bugs