Alexey Samsonov 8e1162c71d Implement nonnull-attribute sanitizer
Summary:
This patch implements a new UBSan check, which verifies
that function arguments declared to be nonnull with __attribute__((nonnull))
are actually nonnull in runtime.

To implement this check, we pass FunctionDecl to CodeGenFunction::EmitCallArgs
(where applicable) and if function declaration has nonnull attribute specified
for a certain formal parameter, we compare the corresponding RValue to null as
soon as it's calculated.

Test Plan: regression test suite

Reviewers: rsmith

Reviewed By: rsmith

Subscribers: cfe-commits, rnk

Differential Revision: http://reviews.llvm.org/D5082

llvm-svn: 217389
2014-09-08 17:22:45 +00:00
..
2011-07-26 21:42:32 +00:00
2011-07-26 21:42:32 +00:00
2011-07-26 21:42:32 +00:00
2011-07-26 21:42:32 +00:00
2011-07-26 21:42:32 +00:00
2011-07-26 21:42:32 +00:00
2011-07-26 21:42:32 +00:00
2011-07-26 21:42:32 +00:00
2011-07-26 21:42:32 +00:00
2011-07-26 21:42:32 +00:00
2013-10-26 15:43:55 +00:00
2011-07-26 21:42:32 +00:00
2011-07-26 21:42:32 +00:00
2014-07-30 22:52:16 +00:00
2013-05-14 12:45:47 +00:00
2013-01-31 23:17:12 +00:00
2012-03-22 23:34:01 +00:00
2013-03-03 16:02:42 +00:00
2014-05-23 19:07:25 +00:00
2010-03-04 18:17:24 +00:00
2014-07-30 22:52:16 +00:00
2014-08-14 17:17:57 +00:00
2013-12-13 19:44:40 +00:00
2012-06-26 21:15:49 +00:00
2012-01-18 04:28:31 +00:00
2014-08-13 19:18:20 +00:00
2014-08-26 12:48:06 +00:00
2013-07-16 20:19:04 +00:00
2013-07-04 15:04:25 +00:00
2012-10-26 23:25:42 +00:00
2011-01-18 18:38:18 +00:00
2012-03-22 23:15:04 +00:00
2012-10-11 00:59:55 +00:00
2014-05-20 17:12:51 +00:00
2012-06-04 03:42:47 +00:00
2010-09-23 09:40:31 +00:00
2013-03-13 22:44:19 +00:00
2013-01-31 23:17:12 +00:00
2011-08-04 21:26:30 +00:00
2011-05-04 18:51:37 +00:00
2014-08-26 21:10:47 +00:00
2013-11-20 20:35:34 +00:00
2013-01-24 23:34:51 +00:00
2013-12-16 19:53:26 +00:00
2012-06-21 23:49:18 +00:00
2013-07-04 14:51:11 +00:00
2013-07-03 01:43:57 +00:00
2014-07-30 22:52:16 +00:00
2012-07-24 20:00:35 +00:00
2014-04-08 22:49:38 +00:00
2014-02-24 19:24:15 +00:00
2013-02-25 18:19:32 +00:00
2013-12-16 19:53:26 +00:00
2012-06-28 08:01:44 +00:00
2013-01-24 23:29:37 +00:00
2014-01-11 21:22:35 +00:00
2014-08-14 15:14:51 +00:00
2012-06-15 06:33:42 +00:00