Commit Graph

28 Commits

Author SHA1 Message Date
Evgeniy Stepanov 3a28dc7158 Fix -Werror compilation.
It was broken in r197601.

llvm-svn: 197665
2013-12-19 08:57:24 +00:00
Lorenzo Martignoni f073541819 [DFSan] New custom wrappers
Added the following custom wrappers:
  strstr
  strrchr
  memchr
  nanosleep
  socketpair

Tweaked a couple of existing wrappers: if a wrapper returns a pointers derived
from an input pointer, then return the label of the input pointer

Sorted tests invocation

Differential Revision: D2354

llvm-svn: 197601
2013-12-18 19:25:34 +00:00
Lorenzo Martignoni 65550a5dd1 [DFSan] Extend the ABI list to discard new glibc functions
Differential Revision: http://llvm-reviews.chandlerc.com/D2291

llvm-svn: 196389
2013-12-04 16:53:10 +00:00
Lorenzo Martignoni dc601d8f3a [DFSan] Change the way labels are propagated when comparing memory through libc functions.
Differential Revision: http://llvm-reviews.chandlerc.com/D2252

llvm-svn: 196388
2013-12-04 16:48:09 +00:00
Lorenzo Martignoni 085bf66e60 Added missing lib/dfsan/scripts/check_custom_wrappers.sh
llvm-svn: 195838
2013-11-27 11:50:44 +00:00
Lorenzo Martignoni 895454e1e4 Implement a bunch of custom glibc wrappers & corresponding tests
llvm-svn: 195749
2013-11-26 11:45:58 +00:00
Peter Collingbourne 4184a471f2 build-libc-list.py: Replace --{,usr,gcc}lib with flags for specific libraries.
This should allow us to cope with newer versions of GCC (and more esoteric
directory layouts).

llvm-svn: 195695
2013-11-25 23:50:05 +00:00
Peter Collingbourne f09d5d03fd Revert r195381, "Implement a bunch of custom glibc wrappers & corresponding tests."
It broke a buildbot.

llvm-svn: 195392
2013-11-21 23:48:19 +00:00
Peter Collingbourne 0a14a71061 Implement a bunch of custom glibc wrappers & corresponding tests.
- Introduce several new custom glibc wrappers
- Implement some of the not yet implemented wrappers
- Refactor and extend the tests
- Add script to make sure all declare custom glibc wrappers are implemented & tested.

Patch by Lorenzo Martignoni!

Differential Revision: http://llvm-reviews.chandlerc.com/D2234

llvm-svn: 195381
2013-11-21 23:18:03 +00:00
Peter Collingbourne 01b337dc2d [dfsan] Tweaks for the ABI list
- Add a bunch of glibc functions to the ABI list
- Group similar functions in the ABI

Patch by Lorenzo Martignoni!

Differential Revision: http://llvm-reviews.chandlerc.com/D2185

llvm-svn: 195110
2013-11-19 06:33:13 +00:00
Alexey Samsonov 4985d5274a [DFSan] Don't include public headers in dfsan runtime code
Summary:
Definitions we use in public sanitizer headers may
slightly conflict with the ones we use in private sanitizer runtimes.
Moreover, we generally forbid to include any system headers (like <stdint.h>)
in sanitizer runtime headers. This leads to inevitable duplication of selected
interface function declarations, but we decided to live with it.

Reviewers: pcc

Reviewed By: pcc

CC: kcc, llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D2179

llvm-svn: 194955
2013-11-17 09:41:47 +00:00
Peter Collingbourne cdec0a8ad2 [dfsan] Add a few easy functions to the ABI list.
llvm-svn: 190653
2013-09-13 01:38:56 +00:00
Peter Collingbourne 0dca2e5ed1 [dfsan] Initial set of DFSAN_OPTIONS flags.
llvm-svn: 190379
2013-09-10 01:51:35 +00:00
Peter Collingbourne 014328e76c [dfsan] Add a syms file.
llvm-svn: 189620
2013-08-29 22:49:00 +00:00
Peter Collingbourne 187a169603 [dfsan] Add custom function for dl_iterate_phdr.
Differential Revision: http://llvm-reviews.chandlerc.com/D1505

llvm-svn: 189503
2013-08-28 20:18:25 +00:00
Peter Collingbourne 3e5524d6c5 [dfsan] Add custom function for pthread_create.
Differential Revision: http://llvm-reviews.chandlerc.com/D1504

llvm-svn: 189502
2013-08-28 20:18:22 +00:00
Peter Collingbourne 469c056299 [dfsan] Integration test for the equal-labels case
llvm-svn: 189134
2013-08-23 18:45:22 +00:00
Peter Collingbourne 12b0809eb1 [dfsan] Initial set of custom functions and interceptors for libc.
Differential Revision: http://llvm-reviews.chandlerc.com/D1397

llvm-svn: 188490
2013-08-15 21:18:53 +00:00
Peter Collingbourne ae52ac7479 [dfsan] Runtime support for -dfsan-debug-nonzero-labels feature.
Reviewers: eugenis

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1406

llvm-svn: 188471
2013-08-15 18:51:07 +00:00
Peter Collingbourne 64308d92c0 [dfsan] New __dfsan_set_label runtime function.
Differential Revision: http://llvm-reviews.chandlerc.com/D1396

llvm-svn: 188411
2013-08-14 20:51:33 +00:00
Peter Collingbourne 0e51eda83b [dfsan] Runtime support for ABI list functionality; can now run integration tests with args ABI.
Differential Revision: http://llvm-reviews.chandlerc.com/D1351

llvm-svn: 188401
2013-08-14 18:54:06 +00:00
Peter Collingbourne 7da504faa4 [dfsan] Introduce dfsan_read_label runtime function.
Differential Revision: http://llvm-reviews.chandlerc.com/D1349

llvm-svn: 188319
2013-08-13 22:15:40 +00:00
Peter Collingbourne da71ea2598 [dfsan] Remove the unused __dfsan_memcpy function.
Differential Revision: http://llvm-reviews.chandlerc.com/D1350

llvm-svn: 188238
2013-08-13 00:16:18 +00:00
Peter Collingbourne a3dc875198 [dfsan] Begin a private header and move shadow_for there.
Differential Revision: http://llvm-reviews.chandlerc.com/D1348

llvm-svn: 188231
2013-08-12 23:51:33 +00:00
Peter Collingbourne 21b2929aca [dfsan] Introduce dfsan_union runtime function.
Differential Revision: http://llvm-reviews.chandlerc.com/D1347

llvm-svn: 188229
2013-08-12 23:47:37 +00:00
Daniel Dunbar bc5dbc435e [tests] Update to use lit_config and lit package, as appropriate.
llvm-svn: 188116
2013-08-09 22:14:01 +00:00
Alexey Samsonov f49c076ff7 Simplify (and fix) check-dfsan configs
llvm-svn: 187968
2013-08-08 08:26:39 +00:00
Peter Collingbourne 5cbab07d02 DataFlowSanitizer; compiler-rt changes.
DataFlowSanitizer is a generalised dynamic data flow analysis.

Unlike other Sanitizer tools, this tool is not designed to detect a
specific class of bugs on its own.  Instead, it provides a generic
dynamic data flow analysis framework to be used by clients to help
detect application-specific issues within their own code.

Differential Revision: http://llvm-reviews.chandlerc.com/D967

llvm-svn: 187924
2013-08-07 22:47:26 +00:00