[llvm-bugs] [Bug 38385] New: Segmentation fault using -mcmodel=large -fpic options after r337740
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Jul 31 06:25:55 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=38385
Bug ID: 38385
Summary: Segmentation fault using -mcmodel=large -fpic options
after r337740
Product: new-bugs
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: ilia.taraban at intel.com
CC: llvm-bugs at lists.llvm.org
This test fails with Segmentation fault after r337740:
================= nice.c ==============
int main ()
{
unsigned int a [100] = {0};
return 0;
}
=======================================
>>> clang -v
clang version 7.0.0 (trunk 338366)
Target: x86_64-unknown-linux-gnu
Thread model: posix
...
>>> clang -O0 -o nice.exe nice.c
>>> nice.exe
>>> clang -O0 -mcmodel=large -fpic -o nice.exe nice.c
>>> nice.exe
Segmentation fault (core dumped)
Started failing after
------------------------------------------------------------------------
r337740 | rnk | 2018-07-23 23:14:35 +0200 (Mon, 23 Jul 2018) | 9 lines
Re-land r335297 "[X86] Implement more of x86-64 large and medium PIC code
models"
Don't try to generate large PIC code for non-ELF targets. Neither COFF
nor MachO have relocations for large position independent code, and
users have been using "large PIC" code models to JIT 64-bit code for a
while now. With this change, if they are generating ELF code, their
JITed code will truly be PIC, but if they target MachO or COFF, it will
contain 64-bit immediates that directly reference external symbols. For
a JIT, that's perfectly fine.
------------------------------------------------------------------------
--
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/20180731/d79b95be/attachment-0001.html>
More information about the llvm-bugs
mailing list