summaryrefslogtreecommitdiff
path: root/lib/dfsan/dfsan_custom.cc
AgeCommit message (Collapse)Author
2015-10-01[compiler-rt] Apply modernize-use-nullptr fixes in sanitizersVedant Kumar
- Trim spaces. - Use nullptr in place of 0 for pointer variables. - Use '!p' in place of 'p == 0' for null pointer checks. - Add blank lines to separate function definitions. - Add 'extern "C"' or 'namespace foo' comments after the appropriate closing brackets This is a continuation of work from 409b7b82. The focus here is on the various sanitizers (not sanitizer_common, as before). Patch by Eugene Zelenko! Differential Revision: http://reviews.llvm.org/D13225 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@248966 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05[libFuzzer] add weak hooks for strcmpKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@244083 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-31[libFuzzer] prepare for __sanitizer_cov_trace_switch in libFuzzer and ↵Kostya Serebryany
sanitizer coverage. Also fix pedantic warnings git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@243721 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-30[sanitizer] add a weak hook for strncmp interceptor, both to dfsan and other ↵Kostya Serebryany
sanitizers. Hide the declaration and the calls in better macros git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@243610 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-07Add dfsan_weak_hook_memcmpKostya Serebryany
Summary: Add a weak hook to be called from dfsan's custom memcmp. The primary user will be lib/Fuzzer. If this works well we'll add more hooks (strcmp, etc). Test Plan: Will be covered by lib/Fuzzer tests. Reviewers: pcc Reviewed By: pcc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D9541 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@236679 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-10Extend s{,n}printf custom wrappers to support '*' in the format specifiersLorenzo Martignoni
Differential Revision: http://reviews.llvm.org/D8966 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@234633 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-09Revert r234477, "Differential Revision: http://reviews.llvm.org/D7249"Peter Collingbourne
Should unbreak fuzzer buildbot. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@234542 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-09Differential Revision: http://reviews.llvm.org/D7249Lorenzo Martignoni
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@234477 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-30[Sanitizers] Introduce GET_LINK_MAP_BY_DLOPEN_HANDLE() macroViktor Kutuzov
Differential Revision: http://reviews.llvm.org/D7233 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@227570 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-13Fix -Wcast-qual warnings in sanitizersAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@221936 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-30Update __dfsw_s{,n}printf custom functions for new calling convention.Peter Collingbourne
Differential Revision: http://reviews.llvm.org/D6029 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@220907 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-08Custom wrappers for DFSanitizing sprintf & snprintf.Lorenzo Martignoni
Differential Revision: http://reviews.llvm.org/D5561 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@219293 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-24Add user-defined callback on write() calls.Peter Collingbourne
Add dfsan_set_write_callback(), which sets a callback to be invoked when a write() call is invoked within DFSan instrumented code. Patch by Sam Kerner! Differential Revision: http://reviews.llvm.org/D3268 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@207131 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-19Fix -Werror compilation.Evgeniy Stepanov
It was broken in r197601. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@197665 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-18[DFSan] New custom wrappersLorenzo Martignoni
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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@197601 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-04[DFSan] Change the way labels are propagated when comparing memory through ↵Lorenzo Martignoni
libc functions. Differential Revision: http://llvm-reviews.chandlerc.com/D2252 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@196388 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-26Implement a bunch of custom glibc wrappers & corresponding testsLorenzo Martignoni
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195749 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-21Revert r195381, "Implement a bunch of custom glibc wrappers & corresponding ↵Peter Collingbourne
tests." It broke a buildbot. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195392 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-21Implement a bunch of custom glibc wrappers & corresponding tests.Peter Collingbourne
- 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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195381 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-17[DFSan] Don't include public headers in dfsan runtime codeAlexey Samsonov
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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194955 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-28[dfsan] Add custom function for dl_iterate_phdr.Peter Collingbourne
Differential Revision: http://llvm-reviews.chandlerc.com/D1505 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189503 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-28[dfsan] Add custom function for pthread_create.Peter Collingbourne
Differential Revision: http://llvm-reviews.chandlerc.com/D1504 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189502 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-15[dfsan] Initial set of custom functions and interceptors for libc.Peter Collingbourne
Differential Revision: http://llvm-reviews.chandlerc.com/D1397 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@188490 91177308-0d34-0410-b5e6-96231b3b80d8