<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Mar 21, 2016 at 10:49 PM, David Blaikie via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span>On Mon, Mar 21, 2016 at 2:46 PM, Rafael Espíndola <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 21 March 2016 at 17:34, Tim Northover via llvm-dev<br>
<span><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
>> My understanding is that clang and llvm themselves are designed this way<br>
>> (crash when the unexpected happens).<br>
><br>
> I don't think so. I'd view any Clang crash as a bug (probably to be<br>
> prioritised below silent CodeGen and many others, but not "working as<br>
> designed").<br>
><br>
>> For example the fact that clang forks itself to be able to report diagnostics<br>
><br>
> That seems like just trying to make our own job easier to me. I think<br>
> the entire point of the fork is to get a backtrace we can fix, and<br>
> point out where the user should send it.<br>
><br>
>> llvm is full of report_fatal_error() (or worse, assertions that can fire on unexpected user input).<br>
><br>
> A bit of a grey area since LLVM isn't itself a user-facing tool, but I<br>
> think I'd still say that a report_fatal_error that's not actionable by<br>
> the user is actually an LLVM bug. And a segfault definitely so.<br>
<br>
</span>It is completely trivial to crash llvm. A case I wrote today in<br>
another thread while waiting for tests to run:<br>
<br>
target triple = "x86_64-unknown-linux-gnu"<br>
@".data" = global i32 42<br>
<br>
That will crash "llc -filetype=obj". The fact that it is considered a<br>
bug doesn't mean much if there is no coordinated effort to fix them.<br></blockquote><div><br></div></span><div>I think it does, actually - that patches will be accepted to fix pretty much any crash in LLVM. (llc isn't a user facing tool, so that's a praticularly low priority - but as a general library (I assume your example also crashes Clang, which would be where this would surface in a more important way) it's pretty well accepted that crashes are bugs, I think)</div><span><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Right now lld is already harder to crash than llvm. We are just being<br>
honest about the fact that it is possible to craft a .o file that will<br>
crash it.<br></blockquote><div><br></div></span><div>But the difference seems to be you know about these cases and don't consider them to be bugs/anything to fix. In LLVM if they're known, they're at least considered bugs and often/usually considered by someone to be worth fixing at some point.<br></div></div></div></div></blockquote><div><br></div><div>I think this is the same from the user's point of view. If LLVM is not crash-bug-free in the version you are using, you need some precaution such as forking in order to protect your program from crashing if you need 100% guarantee.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>- Dave</div><span><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Cheers,<br>
Rafael<br>
<div><div>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</div></div></blockquote></span></div><br></div></div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div></div>