<div dir="ltr">Any chance this could be wired up to the existing buildbot or jenkins infrastructure, rather than having another one?<br><br>(I'm not 100% sure it's better for it to all be together, but figured I'd ask/perhaps there are reasons that've already been considered/articulated)</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Nov 18, 2019 at 9:18 AM Gábor Márton via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:15px;line-height:inherit;vertical-align:baseline;color:rgb(32,31,30)"><p style="font-size:11pt;font-family:Calibri,sans-serif;margin:0px"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:12pt;line-height:inherit;font-family:inherit;vertical-align:baseline;color:black">Dear Clang Community,</span></p><p style="font-size:11pt;font-family:Calibri,sans-serif;margin:0px"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:12pt;line-height:inherit;font-family:inherit;vertical-align:baseline;color:black"><br></span></p><p style="font-size:11pt;font-family:Calibri,sans-serif;margin:0px"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:12pt;line-height:inherit;font-family:inherit;vertical-align:baseline;color:black">TLDR; </span><span style="font-family:inherit;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit;color:black;font-size:12pt">I'd like to encourage you</span><span style="font-family:inherit;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit;color:black;font-size:12pt"> to experiment with CTU static analysis because it has evolved a lot this year! Usage <a href="https://clang.llvm.org/docs/analyzer/user-docs/CrossTranslationUnit.html" target="_blank">documentation</a> is </span><span style="font-family:inherit;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit;color:black;font-size:12pt">available online.</span></p><div style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline"><p style="font-size:11pt;font-family:Calibri,sans-serif;margin:0px"></p></div></div><div style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:15px;line-height:inherit;vertical-align:baseline;color:rgb(32,31,30)"><p style="font-size:11pt;font-family:Calibri,sans-serif;margin:0px"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:12pt;line-height:inherit;font-family:inherit;vertical-align:baseline;color:black"> </span></p></div><div style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:15px;line-height:inherit;vertical-align:baseline;color:rgb(32,31,30)"><p style="font-size:11pt;font-family:Calibri,sans-serif;margin:0px"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:12pt;line-height:inherit;font-family:inherit;vertical-align:baseline;color:black">This year, we have landed several </span><span style="color:black;font-family:inherit;font-size:12pt;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit">ASTImporter patches that made it possible to analyze even C++11/14 projects with </span><span style="color:black;font-family:inherit;font-size:12pt;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit">reasonable stability. I can confidently assure you that the upstream master of </span><span style="color:black;font-family:inherit;font-size:12pt;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit">llvm/llvm-project is as stable as our downstream fork. </span><span style="font-family:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;margin:0px;padding:0px;border:0px;font-stretch:inherit;font-size:12pt;line-height:inherit;vertical-align:baseline;color:black">We've made enormous efforts to properly implement the error handling of ASTImporter and this way we could dramatically improve the stability of CTU. We do have a <a href="https://github.com/Ericsson/clang/projects/2" target="_blank">few more patches</a> that we still want to land in the future, but they are not error handling related. </span><span style="font-family:inherit;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit;color:black;font-size:12pt">From Clang version 10, </span><span style="font-family:inherit;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit;color:black;font-size:12pt">we no longer plan to maintain our CTU downstream fork.</span></p></div><div style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:15px;line-height:inherit;vertical-align:baseline;color:rgb(32,31,30)"><p style="font-size:11pt;font-family:Calibri,sans-serif;margin:0px"><span style="font-family:inherit;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit;color:black;font-size:12pt"><br></span></p><p style="font-size:11pt;font-family:Calibri,sans-serif;margin:0px"><span style="font-family:inherit;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit;color:black;font-size:12pt"></span></p></div><div style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:15px;line-height:inherit;vertical-align:baseline;color:rgb(32,31,30)"><p style="font-size:11pt;font-family:Calibri,sans-serif;margin:0px"><span style="font-family:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;margin:0px;padding:0px;border:0px;font-stretch:inherit;font-size:12pt;line-height:inherit;vertical-align:baseline;color:black">We have set up a <a href="http://codechecker-buildbot.eastus.cloudapp.azure.com:8080/job/ctu_pipeline_clang-master-monorepo/" target="_blank">publicly available Jenkins build server</a> that continuously analyzes the </span><span style="font-family:inherit;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit;color:black;font-size:12pt">following C and C++ projects:</span><br></p></div><div style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:15px;line-height:inherit;vertical-align:baseline;color:rgb(32,31,30)"><p style="font-size:11pt;font-family:Calibri,sans-serif;margin:0px"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:12pt;line-height:inherit;font-family:inherit;vertical-align:baseline;color:black">- Tmux (C)</span></p></div><div style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:15px;line-height:inherit;vertical-align:baseline;color:rgb(32,31,30)"><p style="font-size:11pt;font-family:Calibri,sans-serif;margin:0px"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:12pt;line-height:inherit;font-family:inherit;vertical-align:baseline;color:black">- Curl (C)</span></p></div><div style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:15px;line-height:inherit;vertical-align:baseline;color:rgb(32,31,30)"><p style="font-size:11pt;font-family:Calibri,sans-serif;margin:0px"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:12pt;line-height:inherit;font-family:inherit;vertical-align:baseline;color:black">- Redis (C)</span></p></div><div style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:15px;line-height:inherit;vertical-align:baseline;color:rgb(32,31,30)"><p style="font-size:11pt;font-family:Calibri,sans-serif;margin:0px"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:12pt;line-height:inherit;font-family:inherit;vertical-align:baseline;color:black">- Xerces (C++14)</span></p></div><div style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:15px;line-height:inherit;vertical-align:baseline;color:rgb(32,31,30)"><p style="font-size:11pt;font-family:Calibri,sans-serif;margin:0px"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:12pt;line-height:inherit;font-family:inherit;vertical-align:baseline;color:black">- Bitcoin (C++11)</span></p></div><div style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:15px;line-height:inherit;vertical-align:baseline;color:rgb(32,31,30)"><p style="font-size:11pt;font-family:Calibri,sans-serif;margin:0px"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:12pt;line-height:inherit;font-family:inherit;vertical-align:baseline;color:black">- Protobuf (C++11/C++14)</span></p></div><div style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:15px;line-height:inherit;vertical-align:baseline;color:rgb(32,31,30)"><p style="font-size:11pt;font-family:Calibri,sans-serif;margin:0px"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:12pt;line-height:inherit;font-family:inherit;vertical-align:baseline;color:black"><a href="http://codechecker-buildbot.eastus.cloudapp.azure.com:8080/job/ctu_pipeline_clang-master-monorepo/CTU_20results_20on_20open_20projects_20_28C_29/" target="_blank">CTU analysis results are compared to non-CTU results</a>, both for C projects and </span><span style="color:black;font-family:inherit;font-size:12pt;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit">C++ projects. CTU always results in more findings, and the false-positive/</span><span style="color:black;font-family:inherit;font-size:12pt;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit">true-positive ratio remains roughly the same [1]. We are monitoring the analysis </span><span style="color:black;font-family:inherit;font-size:12pt;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit">job, and if an assertion/crash happens then we are going to get in touch with </span><span style="color:black;font-family:inherit;font-size:12pt;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit">the author of the commit that plausibly caused the error. We also have a </span><a href="https://reviews.llvm.org/D61848" style="font-family:inherit;font-size:12pt;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit" target="_blank">buildbot patch</a><span style="color:black;font-family:inherit;font-size:12pt;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit"> in Phabricator which is ought to analyse only one simple C </span><span style="font-family:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;margin:0px;padding:0px;border:0px;font-stretch:inherit;font-size:12pt;line-height:inherit;vertical-align:baseline;color:black">project (Tmux). We decided to install Jenkins because of ownership and </span><span style="font-family:inherit;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit;color:black;font-size:12pt">flexibility. The buildbot code is pretty convoluted and review and communication are very slow. The buildbot also uses CodeChecker as a dependency, changes to its workflow requires changes in the buildbot configuration as well.</span></p></div><div style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:15px;line-height:inherit;vertical-align:baseline;color:rgb(32,31,30)"><p style="font-size:11pt;font-family:Calibri,sans-serif;margin:0px"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:12pt;line-height:inherit;font-family:inherit;vertical-align:baseline;color:black"><br></span></p><p style="font-size:11pt;font-family:Calibri,sans-serif;margin:0px"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:12pt;line-height:inherit;font-family:inherit;vertical-align:baseline;color:black">Notes: </span></p></div><div style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:15px;line-height:inherit;vertical-align:baseline;color:rgb(32,31,30)"><p style="font-size:11pt;font-family:Calibri,sans-serif;margin:0px"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:12pt;line-height:inherit;font-family:inherit;vertical-align:baseline;color:black">Please note that our primary target for CTU is Linux, and we encourage </span><span style="color:black;font-family:inherit;font-size:12pt;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit">everybody to use </span><a href="https://github.com/Ericsson/codechecker" style="font-family:inherit;font-size:12pt;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit" target="_blank">CodeChecker</a><span style="color:black;font-family:inherit;font-size:12pt;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit"> for CTU (scan-build is no longer supported </span><span style="color:black;font-family:inherit;font-size:12pt;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit"><b>by CTU developers</b></span><span style="color:black;font-family:inherit;font-size:12pt;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit">). Projects that use templates heavily </span><span style="color:black;font-family:inherit;font-size:12pt;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit">may expect an increase in analysis time. Also note that CTU can be very memory </span><span style="color:black;font-family:inherit;font-size:12pt;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit">consuming, e.g. in case of the analysis run on LLVM code we've seen 10GB of resident </span><span style="color:black;font-family:inherit;font-size:12pt;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit">memory usage for one process. Thus, it may be useful to set a maximum limit for </span><span style="color:black;font-family:inherit;font-size:12pt;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit">the loaded ASTUnits (e.g. -analyzer-config ctu-import-threshold=8, with CodeChecker you need to edit an </span><a href="https://github.com/Ericsson/codechecker/blob/master/docs/analyzer/checker_and_analyzer_configuration.md" style="font-family:inherit;font-size:12pt;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit" target="_blank">saargs file</a><span style="color:black;font-family:inherit;font-size:12pt;font-style:inherit;font-variant-ligatures:inherit;font-variant-caps:inherit;font-weight:inherit">).</span></p></div><div style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;font-size:15px;line-height:inherit;vertical-align:baseline;color:rgb(32,31,30)"><p style="font-size:11pt;font-family:Calibri,sans-serif;margin:0px"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:12pt;line-height:inherit;font-family:inherit;vertical-align:baseline;color:black"><br></span></p><p style="font-size:11pt;font-family:Calibri,sans-serif;margin:0px"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:12pt;line-height:inherit;font-family:inherit;vertical-align:baseline;color:black">[1] 2017 EuroLLVM Developers’ Meeting: G. Horvath “Cross Translational Unit Analysis in Clang ...”</span></p><p style="font-size:11pt;font-family:Calibri,sans-serif;margin:0px"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:12pt;line-height:inherit;font-family:inherit;vertical-align:baseline;color:black"><br></span></p><p style="font-size:11pt;font-family:Calibri,sans-serif;margin:0px"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:12pt;line-height:inherit;font-family:inherit;vertical-align:baseline;color:black">Cheers,</span></p><p style="font-size:11pt;font-family:Calibri,sans-serif;margin:0px"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;font-size:12pt;line-height:inherit;font-family:inherit;vertical-align:baseline;color:black">Gabor Marton</span></p></div></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="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div>