[PATCH] [analyzer][Review request] Better modelling of memcpy by the CStringChecker (PR16731)

Anna Zaks zaks.anna at gmail.com
Tue Oct 29 11:45:23 PDT 2013


  Not sure why this did not get forwarded here from cfe-commits:

  Hi Anton,

  Sorry, I see that I've misread your patch. I'll give it another look tomorrow.

  However, can you double check that all the test cases we've discussed in "Re: new/delete checker LLVM false positives" thread are either already in the repository or are added to the patch.

  Thanks,
  Anna.


================
Comment at: test/Analysis/malloc.c:643
@@ -632,2 +642,3 @@
+
 // Rely on the CString checker evaluation of the strcpy API to convey that the result of strcpy is equal to p.
 void symbolLostWithStrcpy(char *s) {
----------------
Should we add the original example(from PR16731) as well?
char *f() {
  void *x = malloc(47);
  char *a;
  memcpy(&a, &x, sizeof a);
  return a;
}


http://llvm-reviews.chandlerc.com/D1887



More information about the cfe-commits mailing list