r218063 - Patch to check at compile time for overflow when

Nico Weber thakis at chromium.org
Thu Sep 18 13:03:47 PDT 2014


On Thu, Sep 18, 2014 at 11:38 AM, jahanian <fjahanian at apple.com> wrote:

>
> On Sep 18, 2014, at 11:33 AM, Reid Kleckner <rnk at google.com> wrote:
>
> > Cool! Do these warnings fire on plain memcpy if the system headers don't
> arrange for memcpy to route to __builtin__memcpy_chk? If so, can you add
> tests for plain prototyped memcpy as you did for strlcpy in the previous
> test?
> >
>
> No they don’t. Note that __builtin__memcpy_chk, etc. will have an added
> argument,  __builtin_object_size,  which will have
> the size of destination buffer and is needed to do the checking.
>

But you can just call the code that does the computation that
__builtin_object_size does when checking memcpy, right?


>
> - Fariborz
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140918/85bedd34/attachment.html>


More information about the cfe-commits mailing list