[llvm-bugs] [Bug 32614] New: ICF causes section ordering to segfault on ARM
llvm-bugs at lists.llvm.org
Mon Apr 10 19:49:22 PDT 2017
Bug ID: 32614
Summary: ICF causes section ordering to segfault on ARM
Assignee: unassignedbugs at nondot.org
Reporter: smeenai at fb.com
CC: llvm-bugs at lists.llvm.org
% cat reduced.s
% clang -target armv7-linux-gnueabi -shared -nostdlib -fuse-ld=lld -Xlinker
--icf=all -o /dev/null reduced.s
(lld crashes during the link)
The assembly is reduced from a C++ source file, so it may not be 100% sensible
(I got rid of a bunch of directives), but it reproduces the segfault. It occurs
in compareByFilePosition  because of AOut being null.
My understanding is that, because of ICF, only one of f and g will actually be
output, hence the OutSec for the other will be null. Adding null checks before
the SectionIndex comparison should get rid of the segfault, but I'm not sure if
there's a better solution.
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