<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">I'm pretty sure that you can crash lld by giving corrupted object files if you know how to do that because there are some corner cases that we do not check all inputs vigorously. For example, I believe the file size in the header is not checked if it's equal or smaller than the actual file size, so it could overrun. Or, if a relocation has a way large offset, it could overrun the current output buffer, etc, etc.</div><div class="gmail_quote"><br></div><div class="gmail_quote">That's not an issue at least for now because lld just crashes for broken object files and nothing worse than that would happen. It would bring us back to the process/library argument, but as I said that's not a focus now. Anyway, object files are created by compilers and unless it is buggy we do not generally see any broken object files, so in reality it's not going to be an issue.</div><div class="gmail_quote"><br></div><div class="gmail_quote">On Wed, Jan 13, 2016 at 1:35 PM, Rafael Espíndola <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">On 4 January 2016 at 13:33, Kostya Serebryany <<a href="mailto:kcc@google.com">kcc@google.com</a>> wrote:<br>
> Cool!<br>
> I wonder if it makes sense to have a fuzzer for lld, similar to what we have<br>
> for clang and clang-format?<br>
<br>
</span>Maybe, it probably depends on what we are fuzzing for.<br>
<br>
Broken .o files are really uncommon, unless one is working on a<br>
producer (MC). For lld itself we have so far been using a "don't<br>
crash" policy, but not much more. For example, we will produce garbage<br>
if given ABI invalid TLS relocations.<br>
<br>
Cheers,<br>
Rafael<br>
<div class=""><div class="h5">_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br></div></div>