Hi Jordy,<br><br>This patch looks good to me. <br><br>About overflow, in the future it could be filtered in another specific integer overflow checker. For example, if we have code:<br><br>  if (x + c1 > c2) ...<br><br>and c2 - c1 > MAX_INT, it's better to process this case in a overflow checker to say that this condition could never be true and emit a warning about it. Then abort the path or proceed as the condition indicates.<br>
<br>With this integer overflow checker, the process of overflow in constraint manager could be simpler or different. For example, we could emit warning once an overflow occurs, and ignore their cancel out effects entirely.<br>
<br><div class="gmail_quote">On Sun, Jun 6, 2010 at 9:01 AM, Jordy Rose <span dir="ltr"><<a href="mailto:jediknil@belkadan.com">jediknil@belkadan.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
*ping*<br>
<br>
Very basic support for handling conditions involving addition and<br>
subtraction, such as this:<br>
<br>
  char* name = malloc(1);<br>
  if (length+1 == 10) {<br>
    free(name);<br>
  }<br>
  if (length+1 == 10) {<br>
    name = malloc(1); // no-warning<br>
  }<br>
  free(name);<br>
<br>
Fixes PR2695; next on the list would be to expand this for the case in<br>
PR4550, which uses shifts. These will be harder, of course, since shifts<br>
and the rest of the binary operations (except XOR) destroy information.<br>
<br>
Hoping this is a reasonable way to implement this? In particular, I get<br>
the feeling that there's an easier way to perform APSInt operations and<br>
catch overflow.<br>
<br>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br>