<div dir="ltr">Dear Mr. Artem,<div>Thank you so much for the answer.</div><div><br></div><div>I really appreciate the help of the community, thank you for your support.</div><div><br></div><div><span style="color:rgb(80,0,80)">Best regards.</span><br style="color:rgb(80,0,80)"><span style="color:rgb(80,0,80)">Salim .Y Kissi </span><br></div><div> </div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mar. 30 nov. 2021 à 06:46, Artem Dergachev <<a href="mailto:noqnoqneo@gmail.com">noqnoqneo@gmail.com</a>> a écrit :<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>
> 3) Does Clang Static Analyzer consider any specific target
(X86, arm, ...etc) during the analysis<br>
<br>
Yes, it assumes the same target that the file is compiled against.
It influences the analysis in a few ways, eg. the static analyzer
assumes integer sizes to be appropriate for the target. If you want
to analyze for a different target you need to build for that target.<br>
<br>
Most clang tools that work on the AST (eg. clang-tidy) will work the
same. You cannot build the AST without specifying the target, and
the resulting AST will be specific to that target.<br>
<br>
<div>On 11/28/21 8:59 AM, salim yahia kissi
via cfe-dev wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Dear everyone,
<div>First of all, I would like to thank all Chairs, organizers,
speakers and the community for making LLVM DEVELOPERS' MEETING
such an amazing event. </div>
<div><br>
<div>
<p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US">I'm a beginner to clang
libtooling so basically i'm building a tool using
RecursiveAstVistor and i have
a couple questions (please correct me if i'm not on the
right way or not using the right library) to detect some
bugs reaching <b>a program point</b> (given as entry
for the analysis) and include some reasoning about the
potential exploit using an smt solver </span>such z3 <span style="font-size:11pt">: </span></p>
<p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:11pt">1)</span><span style="font-size:11pt" lang="EN-US"><span> </span></span><span style="font-size:11pt" lang="EN-US">Is there
a way to track the possible values that a variable can
take on each program's point execution ? (open source</span><span style="font-size:11pt">)</span></p>
<p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:11pt" lang="EN-US">I got an answer
during the "Round Table - Clang Static Analyzer" about
the new google's dataflow framework as well as some
details in the mailing list but the framework is not yet
accessible.</span></p>
<p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:11pt">2) is there a way to get possible
substitutions of a variable at a specific program point
as shown in the following example :</span><br>
</p>
<p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt"><font face="verdana,
sans-serif">void foo(){</font></p>
<p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt"><font face="verdana,
sans-serif"> v1=expr1;</font></p>
<p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt"><span style="font-size:11pt"><font face="verdana, sans-serif">
if(cond1){</font></span></p>
<p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt"><font face="verdana,
sans-serif"> v1=expr2;</font></p>
<p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt"><font face="verdana,
sans-serif"> }</font></p>
<p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt"><font face="verdana,
sans-serif"><span style="font-size:11pt"> bar(v1); <span style="background-color:rgb(255,255,0)">// v1 ==
expr1 || expr2</span></span><br>
</font></p>
<p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt"><font face="verdana,
sans-serif">}</font></p>
<p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">3)
Does Clang Static Analyzer consider any specific target
(X86, arm, ...etc) during the analysis :<span style="font-size:11pt"> </span></p>
<p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:11pt"> - only the machine's target in
which the analysis is performed?</span></p>
<p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">
- no specific target is considered?</p>
<p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">
- the target can be customized?</p>
<p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><br>
</p>
<p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:11pt">4) Is there any
document/ressource that helps newcomers/beginners to map
the right tool/lib or possible alternatives for any
specific need whether for (optimizations, bug detection,
etc).</span><br>
</p>
<p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:11pt"><br>
</span></p>
<p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:11pt">Best regards.</span><br>
</p>
<p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:11pt">Salim .Y Kissi </span></p>
<p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US"> </span></p>
<p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US"><br>
</span></p>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
cfe-dev mailing list
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a>
</pre>
</blockquote>
<br>
</div>
</blockquote></div>