https://bugs.llvm.org/show_bug.cgi?id=37584
Bug ID: 37584
Summary: lld-link crash with SafeSEH and -debug:dwarf
Product: lld
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: COFF
Assignee: unassignedb...@nondot.org
Reporter: smee...@fb.com
CC: compn...@compnerd.org, llvm-bugs@lists.llvm.org,
pe...@pcc.me.uk, r...@google.com, r...@google.com
% cat reduced.s
.globl _main
_main:
ret
.safeseh _main
% clang -target i686-windows-msvc -c reduced.s
% lld-link -entry:main -debug:dwarf reduced.o
(segmentation fault)
We're segfaulting when attempting to write the symbol table, at
https://reviews.llvm.org/diffusion/L/browse/lld/trunk/COFF/Writer.cpp;333237$650.
The symbol is the .sxdata section symbol, which has an RVA of 0. Since the RVA
is 0, whereas the first OutputSection has RVA 4096, we'll break out of the loop
above without ever assigning to Sec, so that'll remain nullptr, hence the
segfault.
This was broken by https://reviews.llvm.org/D42592. I think the reason that
diff broke it is that, prior to it, we would discard .sxdata sections from
input files early
(https://reviews.llvm.org/diffusion/L/browse/lld/trunk/COFF/InputFiles.cpp;324305$154-162),
so we never had the chance to reach the problematic path in the writer.
I'm thinking the .sxdata section symbol having an RVA of 0 is incorrect.
Thoughts on why that might be happening?
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs