<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;"><br>
<div>Hello!<br>
<br>
> I see the diagnostic without any patches. Are you sure you were testing the existing code with alpha.security.ArrayBound on? Is there a more complex example that wasn't working?
<div><br>
I fail to reproduce right now. The warning is reported.<br>
<br>
I'll investigate if I can reproduce the false negative again.<br>
<br>
Thanks!<br>
Daniel Marjamäki<br>
</div>
<br>
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<p class="MsoNormal" style="margin:0cm 0cm 0pt"><span style="font-family:'Arial','sans-serif'; color:gray; font-size:8pt">..................................................................................................................</span></p>
<p class="MsoNormal" style="margin:0cm 0cm 0pt"><span style="font-family:'Arial','sans-serif'; color:black; font-size:8pt">Daniel Marjamäki
</span><span style="font-family:'Arial','sans-serif'; color:gray; font-size:8pt">Senior Engineer</span></p>
<p class="MsoNormal" style="margin:0cm 0cm 0pt"><span style="font-family:'Arial','sans-serif'; color:gray; font-size:8.5pt" lang="EN-US">Evidente ES East</span><span style="font-family:'Arial','sans-serif'; color:gray; font-size:8pt" lang="EN-US"> AB<span> 
</span>Warfvinges väg 34<span>  </span>SE-112 51 Stockholm<span>  </span>Sweden </span>
</p>
<p class="MsoNormal" style="margin:0cm 0cm 0pt"><span style="font-family:'Arial','sans-serif'; color:gray; font-size:8pt" lang="EN-US"></span> </p>
<p class="MsoNormal" style="margin:0cm 0cm 0pt"><span style="font-family:'Arial','sans-serif'; color:gray; font-size:8pt" lang="EN-GB">Mobile</span><span style="font-family:'Arial','sans-serif'; color:gray; font-size:8pt" lang="EN-GB">:<span>                
</span>+46 (0)709 12 42 62</span></p>
<p class="MsoNormal" style="margin:0cm 0cm 0pt"><span style="font-family:'Arial','sans-serif'; color:gray; font-size:8pt" lang="EN-GB"></span><span style="font-family:'Arial','sans-serif'; color:gray; font-size:8pt" lang="EN-GB">E-mail:<span>   
</span><span>             <a href="mailto:Daniel.Marjamaki@evidente.se" tabindex="0">
Daniel.Marjamaki</a></span><a href="mailto:Daniel.Marjamaki@evidente.se" tabindex="0">@evidente.se</a><span>     
</span><span>                 </span></span></p>
<p class="MsoNormal" style="margin:0cm 0cm 0pt"><span style="font-family:'Arial','sans-serif'; color:gray; font-size:8pt" lang="EN-GB"></span> </p>
<p class="MsoNormal" style="margin:0cm 0cm 0pt"><span style="font-family:'Arial','sans-serif'; font-size:8pt" lang="EN-GB">www.evidente.se</span></p>
</div>
</div>
</div>
</div>
</div>
</div>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF52028"><font color="#000000" face="Tahoma" size="2"><b>Från:</b> Jordan Rose [jordan_rose@apple.com]<br>
<b>Skickat:</b> den 18 februari 2014 18:08<br>
<b>Till:</b> Daniel Marjamäki<br>
<b>Cc:</b> cfe-dev@cs.uiuc.edu<br>
<b>Ämne:</b> Re: [cfe-dev] RFC on array-bounds patch<br>
</font><br>
</div>
<div></div>
<div>
<div style="word-wrap:break-word">
<div>I see the diagnostic without any patches. Are you sure you were testing the existing code with alpha.security.ArrayBound on? Is there a more complex example that wasn't working?</div>
<div><br>
</div>
<div>Background: checkLocation is supposed to be called on both loads and stores already, which is why it has the "isLoad" argument.</div>
<div><br>
</div>
<div>Jordan</div>
<div><br>
</div>
<br>
<div>
<div>On Feb 17, 2014, at 10:29 , Daniel Marjamäki <<a href="mailto:Daniel.Marjamaki@evidente.se" target="_blank">Daniel.Marjamaki@evidente.se</a>> wrote:</div>
<br class="x_Apple-interchange-newline">
<blockquote type="cite">
<div style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px">
<div style="direction:ltr; font-family:Tahoma; font-size:10pt">Hello!<br>
<br>
Here is a patch that will make Clang warn when there is this index out of bounds:<br>
<br>
    void f(int x) {<br>
        int a[10];<br>
        if (x >= 10)<br>
            a[x] = x;<br>
    }<span class="x_Apple-converted-space"> </span><br>
<div><br>
The checkLocation is not triggered on the "a[x] = x;" statement. Is this by design? Is the checkPrestmt a good choice or would it be better to choose some other check type?<br>
<br>
Best regards,<br>
Daniel Marjamäki<br>
<br>
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="margin:0cm 0cm 0pt"><span style="font-family:Arial,sans-serif; color:gray; font-size:8pt">..................................................................................................................</span></div>
<div style="margin:0cm 0cm 0pt"><span style="font-family:Arial,sans-serif; font-size:8pt">Daniel Marjamäki<span class="x_Apple-converted-space"> </span></span><span style="font-family:Arial,sans-serif; color:gray; font-size:8pt">Senior Engineer</span></div>
<div style="margin:0cm 0cm 0pt"><span style="font-family:Arial,sans-serif; color:gray; font-size:8.5pt" lang="EN-US">Evidente ES East</span><span style="font-family:Arial,sans-serif; color:gray; font-size:8pt" lang="EN-US"><span class="x_Apple-converted-space"> </span>AB<span> <span class="x_Apple-converted-space"> </span></span>Warfvinges
 väg 34<span> <span class="x_Apple-converted-space"> </span></span>SE-112 51 Stockholm<span> <span class="x_Apple-converted-space"> </span></span>Sweden</span></div>
<p class="x_MsoNormal" style="margin:0cm 0cm 0pt"><span style="font-family:Arial,sans-serif; color:gray; font-size:8pt" lang="EN-US"></span> </p>
<div style="margin:0cm 0cm 0pt"><span style="font-family:Arial,sans-serif; color:gray; font-size:8pt" lang="EN-GB">Mobile</span><span style="font-family:Arial,sans-serif; color:gray; font-size:8pt" lang="EN-GB">:<span>                <span class="x_Apple-converted-space"> </span></span>+46
 (0)709 12 42 62</span></div>
<div style="margin:0cm 0cm 0pt"><span style="font-family:Arial,sans-serif; color:gray; font-size:8pt" lang="EN-GB"></span><span style="font-family:Arial,sans-serif; color:gray; font-size:8pt" lang="EN-GB">E-mail:<span>   <span class="x_Apple-converted-space"> </span></span><span>            <span class="x_Apple-converted-space"> </span><a href="mailto:Daniel.Marjamaki@evidente.se" tabindex="0" target="_blank">Daniel.Marjamaki</a></span><a href="mailto:Daniel.Marjamaki@evidente.se" tabindex="0" target="_blank">@evidente.se</a><span>     <span class="x_Apple-converted-space"> </span></span><span>                </span></span></div>
<p class="x_MsoNormal" style="margin:0cm 0cm 0pt"><span style="font-family:Arial,sans-serif; color:gray; font-size:8pt" lang="EN-GB"></span> </p>
<div style="margin:0cm 0cm 0pt"><span style="font-family:Arial,sans-serif; font-size:8pt" lang="EN-GB"><a href="http://www.evidente.se/" target="_blank">www.evidente.se</a></span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
<div style="word-wrap:break-word">
<div>
<blockquote type="cite">
<div style="font-family:Helvetica; font-size:12px; font-style:normal; font-variant:normal; font-weight:normal; letter-spacing:normal; line-height:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px">
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a></div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</body>
</html>