Should be fine for memcpy, strcpy, strncpy.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
I can't be sure whether this marking is sound.
void g(char *p); // maybe capture p void f(char *p, char *q){ g(p); memcpy(p, q, 10); }
In the case above, I think we cannot mark p as noalias in memcpy callsite. Do I misunderstand the semantic of memcpy?
Comment Actions
“ // The semantics of memcpy intrinsics forbid overlap between their respective
// operands, i.e., source and destination of any given memcpy must no-alias.”
(Alias analysis’s code comment)
See the missing test comment.