<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Jan 26, 2015 at 1:04 PM, Lucas Tanure <span dir="ltr"><<a href="mailto:tanure@linux.com" target="_blank">tanure@linux.com</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"><div dir="ltr"><span style="font-size:12.8000001907349px">Hi, </span><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">Newbie here. </div><div style="font-size:12.8000001907349px">I'm trying to understand a few issues in kdevelop clang plugin, and for that I would like to use clang in debug mode.</div><div style="font-size:12.8000001907349px">But when I compile 3.5.1 for Debug, asserts come too, and this give a crash in kdevelop:</div><div style="font-size:12.8000001907349px">[snip]</div><div style="font-size:12.8000001907349px">I just want to compile clang in debug mode without asserts.</div></div></blockquote><div><br></div><div>This is just asking to crash later with sigsegv. =/ That particular assertion is:</div><div><br></div><div><div>void Lexer::lexVerbatimBlockFirstLine(Token &T) {</div><div>again:</div><div>  assert(BufferPtr < CommentEnd);</div><div><br></div></div><div>So, failing that assertion is equivalent to memory OOB access.</div><div><br></div><div>Barring an enormous push to stabilize Clang and make it less crashy, you have two options:</div><div>1. Try to recover from assertion failures and segfaults with CrashRecoveryContext</div><div>2. Rig up a separate process to run clang in from kdevelop</div><div><br></div><div>A separate process will be more stable but far more effort.</div><div><br>You'd think compilers wouldn't crash very often, but take a look at the list of crashers found by AFL:</div><div><a href="http://llvm.org/bugs/buglist.cgi?quicksearch=fuzz&list_id=66187">http://llvm.org/bugs/buglist.cgi?quicksearch=fuzz&list_id=66187</a></div><div>While these are all bugs we'd like fixed, it's not clear how soon that will happen. Until then, KDevelop and IDEs in general will need to cope with compiler crashes somehow.</div></div></div></div>