<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 21, 2016 at 2:27 PM, Mehdi Amini 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 style="word-wrap:break-word"><br><div><span class=""><blockquote type="cite"><div>On Mar 21, 2016, at 2:20 PM, James Molloy via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:</div><br><div>Rafael,<br><br>How can a high quality product crash by design? I understand the lack of structured error handling, and I understand asserting (which in release mode would be silent) on internal errors. But on an input? How can an application be taken seriously when crashes are design features?<br><br>And I certainly didn't see consensus or in fact the suggestion of this in the other thread, unless I glazed over an important part. <br></div></blockquote><div><br></div></span><div>My understanding is that clang and llvm themselves are designed this way (crash when the unexpected happens). For example the fact that clang forks itself to be able to report diagnostics is a good indication that this is assumed, and llvm is full of report_fatal_error() (or worse, assertions that can fire on unexpected user input).</div></div></div></blockquote><div><br></div><div>So far as I know, any place where LLVM asserts on user input is a bug - maybe not a high priority bug in some cases, maybe a difficult bug in some cases, but a bug.<br><br>report_fatal_error is a bit of a wart, to be sure (but that's more along the lines of the previous LLD design thread - API level error handling V exit(1) from deep in the library*)<br><br>* I didn't understand the previous LLD therad to include the possibility of crash/assert by design, but exit(1) by design V return error codes up the stack - the latter is what I thought that thread was about.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div>I complained on the list at some point that "by design" LLVM as a library requires you to fork and run in a separate process, but the tradeoff in the ease of implementation seems to be the current consensus.</div></div></div></blockquote><div><br></div><div>The forking in a separate process is, so far as I understand, simply a necessary defensive measure for certain products - we accept that LLVM has bugs that may lead it to crash, so we want crash reports when that happens. The fact that we report the crashes and fix them seems to indicate that they're not by design. If the fork was simply to swallow (rather than report) the crashes, then it would seem to indicate crash-by-design, but it isn't.<br><br>- David</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><span class="HOEnZb"><font color="#888888"><div><br></div><div>-- </div><div>Mehdi</div><div><br></div><div><br></div><div><br></div><div><br></div><br></font></span><blockquote type="cite"><div><span class=""><br>James<br><div class="gmail_quote"><div dir="ltr">On Mon, 21 Mar 2016 at 21:16, Rui Ueyama <<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Of course I'm not happy. And I hope that you understood that that is unusual. Having said that, I'd say it's however reasonable.</p>
</blockquote></div></span>
_______________________________________________<span class=""><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" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br></span></div></blockquote></div><br></div><br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">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>