<div dir="ltr"><div>Hi <span style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">George,</span></div><div><span style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div>As you mentioned above, assertions are good for developers. But for users, they are annoyed, especially when the scan process is nearly finished. My team is developing the tool, but the users are from other teams, so the "production" version for these teams should be "stable" enough, even though all the mistakes are hidden.<div>The errors vary from project to project, and only a few open source projects in our benchmark will trigger the assertions in clang, so they are hard to model. And my team has very few developers, we do not have enough time to model these errors, neither the user team (they even do not want to provide their code to us).</div><div>My team is using the old version (3.3) of the llvm/clang project (the oldest code may be written originally by Zhongxing Xu, the writer of the paper which the clang static analyzer is based on, even older than the clang static analyzer itself), I am not sure these "bugs" in clang and llvm still exists in the latest versions. And the count of developers limits us from updating the clang/llvm version, as we have so many features to develop and have limited time to do so.</div><div><br></div><div>Regards,</div><div>Ella</div></div><br><div class="gmail_quote"><div dir="ltr">George Karpenkov <<a href="mailto:ekarpenkov@apple.com">ekarpenkov@apple.com</a>> 于2018年6月26日周二 上午2:38写道:<br></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;line-break:after-white-space">Hi Ella,<br><div><br><blockquote type="cite"><div>On Jun 24, 2018, at 1:23 AM, alan snape via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>> wrote:</div><br class="m_-2221221588749048722Apple-interchange-newline"><div><div dir="ltr">My team is developing a static analysis tool based on clang and llvm, but the assertion failures in the source code of llvm and clang will always crash the program execution, which is not acceptable in a **stable product**.</div></div></blockquote><div><br></div><div>Each assertion failure is a bug you can report at <a href="http://bugs.llvm.org" target="_blank">bugs.llvm.org</a>. Do you really get that many?</div><div>We at Apple regularly run the clang static analyzer on huge chunks of the internal codebase, and in my understanding Google does the same,</div><div>so I am quite surprised this is a problem for you.</div><div> </div><blockquote type="cite"><div><div dir="ltr"> The tool analyzes the functions one by one in the Call Graph SCC order, so is there any way to tolerate the assertion failures and continue the analysis on the next function when assertion failures occur on calling some APIs of clang and llvm? (crashes only the analysis of the function<span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span> </span>(the analysis methods of the FunctionDecl)</span> being analyzed, not the entire program)</div></div></blockquote><div><br></div><div>I would really like to challenge your assumption here that assertions are unacceptable.</div><div><br></div><div>A clean crash with an understandable stack trace means that the problem can be fixed.</div><div>Adding layers of indirection which hide those failures means that the bug gets unnoticed,</div><div>and the analyzer probably ends up doing something wrong.</div><div><br></div><div>Could you clarify what is the common error mode for you?</div><div><br></div><div>Regards,</div><div>George</div><br><blockquote type="cite"><div><div dir="ltr"><div><br></div><div>Thanks,</div><div>Ella</div></div>
_______________________________________________<br>cfe-dev mailing list<br><a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br></div></blockquote></div><br></div></blockquote></div>