[sanitizer] Syscall handlers for clock_gettime and clock_getres.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185913 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] Fix windows build.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185917 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] Wrap lines >80 chars.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185920 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] Intercept realpath and canonicalize_file_name.

Handle realpath(path, NULL) form.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185921 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] Support GLOB_ALTDIRFUNC in glob interceptor.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185932 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] Update glob64 interceptor to handle GLOB_ALTDIRFUNC as well.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185935 91177308-0d34-0410-b5e6-96231b3b80d8
[asan] Update blacklists to use categories.

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

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185980 91177308-0d34-0410-b5e6-96231b3b80d8
Merge branch 'master' into powerpc-darwin8
Fix a bug in the readdir_r interceptor: when we reach the end of the
directory stream, the entry is not written to, instead *result is set to
NULL and the entry is not written to at all.

I'm still somewhat suspicious of the correct instrumention here --
I feel like it should be marking the written range as the pointer in
*result and the length (*result)->d_reclen in case the implementation
decides not to use the passed-in entry (if that's even allowed).
Finally, the definition of 'struct dirent' analog used in the
interceptor is wrong in 32-bit mode with _FILE_OFFSET_BITS=64 as it hard
codes the use of a pointer-sized offset.

I've added a somewhat goofy test for the bug I fixed via ASan --
suggestions on how to better test the interceptor logic itself welcome.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185998 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] Fix handling of edge cases in mbstowcs-like interceptors.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@186002 91177308-0d34-0410-b5e6-96231b3b80d8
[sanitizer] More checks in mbstowcs-like interceptors.


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@186004 91177308-0d34-0410-b5e6-96231b3b80d8
Merge branch 'master' into powerpc-darwin8