Evgeniy Stepanov
24c8d92fec
[sanitizer] Intercept a subset of sunrpc interface (xdr_*).
...
llvm-svn: 205627
2014-04-04 14:51:23 +00:00
Evgeniy Stepanov
86a4d2c32b
[sanitizer] Intercept fgetpwent / fgetgrent.
...
These interceptors require deep unpoisoning of return values.
While at it, we do the same for all other pw/gr interceptors to
reduce dependency on libc implementation details.
llvm-svn: 205004
2014-03-28 13:03:55 +00:00
Evgeniy Stepanov
7b44e1ad42
[sanitizer] Intercept ftime.
...
llvm-svn: 204991
2014-03-28 08:33:32 +00:00
Evgeniy Stepanov
9dcd5a353a
[msan] Intercept several malloc-related functions.
...
llvm-svn: 204923
2014-03-27 13:29:29 +00:00
Evgeniy Stepanov
037c271f41
[sanitizer] Fix iOS build.
...
llvm-svn: 202374
2014-02-27 10:09:21 +00:00
Evgeniy Stepanov
a16f327c27
[sanitizer] Sizes and layouts for sanitizers on FreeBSD.
...
Patch by Viktor Kutuzov.
llvm-svn: 202364
2014-02-27 09:02:08 +00:00
Evgeniy Stepanov
cba008e9c5
[asan] A different way of detectinb stack overflow.
...
Instead of checking stack limits that are not well defined for the main thread,
we rely on siginfo::si_code and distance from SP.
llvm-svn: 201673
2014-02-19 13:40:41 +00:00
Evgeniy Stepanov
791a7e1603
[msan] Return EINVAL instead of crashing from mmap of an invalid address.
...
llvm-svn: 201074
2014-02-10 09:37:03 +00:00
Alexey Samsonov
adcf48fa35
[Sanitizer] Don't #include the same system header twice.
...
llvm-svn: 201071
2014-02-10 08:57:28 +00:00
Evgeniy Stepanov
c75ef739a1
[sanitizer] struct ustat and a bunch of other definitions are missing on Android.
...
llvm-svn: 201068
2014-02-10 08:00:24 +00:00
Sergey Matveev
f3a8acf38a
[sanitizer] Fix build.
...
llvm-svn: 200942
2014-02-06 19:36:10 +00:00
Sergey Matveev
544d07f861
[sanitizer] One does not simply intercept getifaddrs().
...
Upgrade the interceptor, and attempt to fix the Android build.
llvm-svn: 200936
2014-02-06 18:48:23 +00:00
Sergey Matveev
07802a090a
[sanitizer] Intercept getifaddrs().
...
llvm-svn: 200926
2014-02-06 17:42:36 +00:00
Sergey Matveev
0c62992d6e
[sanitizer] Intercept getresuid and getresgid.
...
llvm-svn: 200925
2014-02-06 15:12:56 +00:00
Sergey Matveev
c5c84a1d86
[sanitizer] Implement ioctl decoding.
...
When an unknown ioctl is encountered, try to guess the parameter size from the
request id.
llvm-svn: 200872
2014-02-05 19:35:24 +00:00
Sergey Matveev
c18b36625e
[sanitizer] Partial revert of recent ioctl changes.
...
Some build environments are missing the required headers.
This reverts r200544, r200547, r200551. This does not revert the change that
introduced READWRITE ioctl type.
llvm-svn: 200567
2014-01-31 19:19:45 +00:00
Evgeniy Stepanov
a78dbe2e6f
[asan] Fix Android build.
...
llvm-svn: 200551
2014-01-31 14:46:37 +00:00
Sergey Matveev
dffda4cfec
[sanitizer] Attempt to fix Android build.
...
llvm-svn: 200547
2014-01-31 14:28:32 +00:00
Sergey Matveev
6b3397546e
[sanitizer] Support most ioctls from /usr/include/sound/.
...
llvm-svn: 200544
2014-01-31 14:02:21 +00:00
Evgeniy Stepanov
3f6af151df
[sanitizer] Fix typo that breaks shmctl() interceptor.
...
https://code.google.com/p/address-sanitizer/issues/detail?id=259
llvm-svn: 200468
2014-01-30 14:31:26 +00:00
Evgeniy Stepanov
067f54718f
[msan] Disable mmap outside of application address range.
...
llvm-svn: 200200
2014-01-27 09:12:22 +00:00
Alexey Samsonov
9f6218bf44
PR17977: don't assume EOWNERDEAD is always defined
...
Summary: See details in http://llvm.org/bugs/show_bug.cgi?id=17977
Reviewers: dvyukov
Reviewed By: dvyukov
CC: glider, llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2340
llvm-svn: 196779
2013-12-09 13:21:43 +00:00
Evgeniy Stepanov
b56c5cd95e
[sanitizer] Intercept times.
...
llvm-svn: 195918
2013-11-28 14:41:22 +00:00
Evgeniy Stepanov
39cc337e20
[sanitizer] Change the way we use certain linux kernel headers.
...
Some linux headers are broken on older kernels.
Instead of depending on the constants and types from such headers directly,
we provide our own definitions and then verify them with compile-time
assertions. This makes the dependency on the headers test-only and would allow
switching to some other way of testing on older kernels, or even disable the
tests as the last resort (after all, kernel interfaces are supposed to be
stable).
llvm-svn: 195427
2013-11-22 09:01:50 +00:00
Bob Wilson
99d8fa92c3
Remove #include of net/ip_mroute.h for SANITIZER_MAC.
...
This header has not been supported at all for the last 2 major OS X releases.
Removed its include and the capture of related symbols.
<rdar://problem/15303348>
llvm-svn: 194841
2013-11-15 19:13:08 +00:00
Dmitry Vyukov
4bbe6dc8a9
tsan: add support for robust mutexes
...
llvm-svn: 194823
2013-11-15 16:58:12 +00:00
Kostya Serebryany
82d0679e92
[asan] attempting to fix x32 build (see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59018 )
...
llvm-svn: 194155
2013-11-06 17:47:39 +00:00
Evgeniy Stepanov
2335879ff1
[sanitizer] Enhance io_submti syscall handler.
...
llvm-svn: 193848
2013-11-01 01:20:39 +00:00
Alexander Potapenko
ac501f0250
[libsanitizer] Define SANITIZER_IOS when building for iOS or iOS simulator.
...
Do not use struct stat64 and struct statfs64 when building for iOS, where __DARWIN_ONLY_64_BIT_INO_T is set to 1.
llvm-svn: 193775
2013-10-31 17:38:18 +00:00
Evgeniy Stepanov
60db142d86
[asan] Fix syscall hooks build on Android.
...
llvm-svn: 193670
2013-10-30 00:58:17 +00:00
Evgeniy Stepanov
477f8b73a5
[sanitizer] Ptrace syscall handler.
...
llvm-svn: 193633
2013-10-29 17:59:45 +00:00
Evgeniy Stepanov
451c8de2d8
[msan] Intercept shmat.
...
llvm-svn: 193581
2013-10-29 02:48:49 +00:00
Evgeniy Stepanov
f312b480e2
[sanitizer] Intercept shmctl.
...
llvm-svn: 193348
2013-10-24 14:47:34 +00:00
Evgeniy Stepanov
3e6064f9d2
[sanitizer] Intercept ether_* functions.
...
llvm-svn: 193241
2013-10-23 13:57:47 +00:00
Alexander Potapenko
e45ca59fd9
[ASan] fix compilation of sanitizer_platform_limits_posix.cc on OSX.
...
llvm-svn: 192975
2013-10-18 14:16:54 +00:00
Evgeniy Stepanov
78c5730bec
[sanitizer] Fix OSX build some more.
...
llvm-svn: 192967
2013-10-18 12:19:23 +00:00
Evgeniy Stepanov
b4e501c6ec
[sanitizer] Fix OSX build.
...
llvm-svn: 192966
2013-10-18 11:26:02 +00:00
Evgeniy Stepanov
3cb9df042e
[sanitizer] Move statfs/fstatfs to common interceptors and add statvfs/fstatvfs.
...
llvm-svn: 192965
2013-10-18 11:14:16 +00:00
Evgeniy Stepanov
70d5abfba2
[sanitizer] Intercept getmntent, getmntent_r.
...
llvm-svn: 192959
2013-10-18 09:41:43 +00:00
Alexey Samsonov
edecc38395
Make some pthread_mutex_* and pthread_cond_* interceptors common.
...
Reviewers: eugenis, dvyukov
Reviewed By: dvyukov
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1937
llvm-svn: 192774
2013-10-16 08:20:31 +00:00
Evgeniy Stepanov
c907a60ffb
[sanitizer] Fix localtime and gmtime interceptors to clean tm->tm_zone.
...
llvm-svn: 191827
2013-10-02 14:30:03 +00:00
Alexey Samsonov
4fc53e4c06
[Sanitizer] Don't include wordexp.h on Android
...
llvm-svn: 191358
2013-09-25 07:41:46 +00:00
Evgeniy Stepanov
2761ee0409
[sanitizer] Intercept wordexp.
...
llvm-svn: 191305
2013-09-24 14:38:22 +00:00
Evgeniy Stepanov
73166796a3
[sanitizer] Avoid including any system headers in the system-header-free part of the runtime library.
...
llvm-svn: 190161
2013-09-06 15:34:17 +00:00
Evgeniy Stepanov
5c1035e7fa
[sanitizer] A bunch of linux system call handlers.
...
llvm-svn: 190157
2013-09-06 14:20:01 +00:00
Evgeniy Stepanov
a40a058ff1
[sanitizer] Simplify sigaction and sigset_t handling.
...
llvm-svn: 189338
2013-08-27 11:10:04 +00:00
Chandler Carruth
022a3d4e88
Revert r188369 (and r188455) which breaks the build on at least some
...
Linux systems. I've replied on the original commit thread with details
of the problem.
llvm-svn: 188628
2013-08-18 08:47:06 +00:00
Evgeniy Stepanov
0bb7577d89
[sanitizer] Split platform_limits_posix into system- and kernel-dependent parts.
...
This change moves everything depending on kernel headers (mostly ioctl types
and ids) into a separate source file. This will reduce the possibility of
header conflict on various platforms (most importantly, older glibc versions).
This change also removes 2 deprecated ioctls, and symbolic ids for other bunch
of ambiguous ioctls (i.e. same id is shared by ioctls with different memory
behavior).
llvm-svn: 188369
2013-08-14 13:34:14 +00:00
Evgeniy Stepanov
64cace0687
[sanitizer] Intercept poll/ppoll.
...
llvm-svn: 188177
2013-08-12 13:19:53 +00:00
Alexey Samsonov
eb7973246f
[ASan] Bump min supported Mac OS X version to 10.6
...
llvm-svn: 186404
2013-07-16 11:54:40 +00:00