[PATCH] Checked arithmetic builtins

Michael Gottesman mgottesman at apple.com
Tue Jun 18 15:11:45 PDT 2013


Hello cfe commits!

The attached patch adds checked-arithmetic builtins to ameliorate such code in security critical applications (for instance webkit). It simply exposes {u,s}{add,sub,mul}.

*NOTE* The u{add,sub} overlaps with the multi precision built-ins. I decided to add in the additional builtin since users are going to see s{add,sub} and look for u{add,sub}. We could add in a Builtins.h header where I could implement the checked arithmetic with the multi precision arithmetic builtins but I felt that was a bigger change than this.

Please review,
Michael

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-checked-arithmetic-builtins-Added-builtins-to-enable.patch
Type: application/octet-stream
Size: 16577 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130618/32e84ab5/attachment.obj>


More information about the cfe-commits mailing list