Evgeniy Stepanov
3076ba0a08
[sanitizer] Intercept getgrnam{_r}, getgrgid{_r}.
...
llvm-svn: 180091
2013-04-23 12:01:20 +00:00
Evgeniy Stepanov
0cd7cf8217
[msan] Allow clock_getres(, 0).
...
llvm-svn: 180090
2013-04-23 11:48:31 +00:00
Evgeniy Stepanov
d1dae90bf2
[msan] Fix gcc build of msan_test.
...
llvm-svn: 179594
2013-04-16 14:09:47 +00:00
Evgeniy Stepanov
b0d786798c
[msan] Fix sigaction test.
...
Restore SIGPROF handler to the original state after the test.
llvm-svn: 179524
2013-04-15 13:35:05 +00:00
Evgeniy Stepanov
b4eac2f810
[msan] Interceptors for pipe2 and socketpair.
...
llvm-svn: 179022
2013-04-08 13:45:12 +00:00
Evgeniy Stepanov
7ba7207f1d
[msan] Intercept time().
...
llvm-svn: 179002
2013-04-08 08:25:22 +00:00
Evgeniy Stepanov
e7a7a9b972
[msan] Fix sigaction interceptor.
...
llvm-svn: 178868
2013-04-05 12:58:07 +00:00
Evgeniy Stepanov
1f8b3538b4
[msan] Unpoison siginfo_t and ucontext_t in signal handlers.
...
Add wrappers for all user signal handlers to unpoison the handler's arguments.
llvm-svn: 178754
2013-04-04 08:22:52 +00:00
Evgeniy Stepanov
f8213b4eb3
[sanitizer] More interceptors.
...
getpwnam, getpwuid, getpwnam_r, getpwuid_r, clock_getres, clock_gettime,
clock_settime, getitimer, setitimer, sigaction (MSan).
llvm-svn: 178465
2013-04-01 14:47:21 +00:00
Evgeniy Stepanov
ecbf64648f
[msan] Handle dlopen() failure in dlopen interceptor.
...
llvm-svn: 177728
2013-03-22 11:59:49 +00:00
Evgeniy Stepanov
93a842bd1f
[msan] Move test main and gtest include to separate files.
...
llvm-svn: 177718
2013-03-22 09:01:26 +00:00
Evgeniy Stepanov
bfe9df221d
[msan] Place dlopen in an anon namespace.
...
llvm-svn: 177716
2013-03-22 08:49:36 +00:00
Evgeniy Stepanov
b4a218db34
[sanitizer] Don't adjust the size of the user-allocated stack.
...
Moved this code to sanitizer_common.
llvm-svn: 177383
2013-03-19 09:30:52 +00:00
Evgeniy Stepanov
c6bce93591
[msan] Intercept readdir64.
...
llvm-svn: 177065
2013-03-14 12:49:23 +00:00
Evgeniy Stepanov
4062a396c7
[msan] Fix a typo in test.
...
llvm-svn: 177059
2013-03-14 11:58:13 +00:00
Evgeniy Stepanov
231894a902
[sanitizer] Intercept frexp and friends.
...
llvm-svn: 177056
2013-03-14 11:34:39 +00:00
Evgeniy Stepanov
ead6cf7c72
[msan] Intercept __strdup, strndup, __strndup.
...
llvm-svn: 177052
2013-03-14 11:10:36 +00:00
Evgeniy Stepanov
98f5ea0dba
[msan] Increase stack size as required.
...
Adjust stack size in pthread_attr_t when the app-requested size does not fit MSan TLS.
llvm-svn: 176939
2013-03-13 09:01:40 +00:00
Reid Kleckner
c9d382b5a4
[msan] intercept dlopen and clear shadow for it
...
Summary:
The loader does not call mmap() through the PLT because it has to
bootstrap the process before libc is present. Hooking dlopen() isn't
enough either because the loader runs module initializers before
returning, and they could run arbitrary msan instrumented code.
If msandr is present, then we can intercept the mmaps from dlopen at the
syscall layer and clear the shadow there. If msandr is missing, we
clear the shadow after dlopen() and hope any initializers are trivial.
Reviewers: eugenis
CC: kcc, llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D509
llvm-svn: 176818
2013-03-11 18:07:42 +00:00
Evgeniy Stepanov
ea61d08185
[sanitizer] Add interceptors for localtime and friends.
...
llvm-svn: 175499
2013-02-19 09:19:16 +00:00
Evgeniy Stepanov
e676f66fe3
[msan] Allow zero buf pointer in getcwd() interceptor.
...
llvm-svn: 174970
2013-02-12 14:36:22 +00:00
Evgeniy Stepanov
358698279d
[sanitizer] Further split private and public sanitizer headers.
...
And make msan_interface.h C-compatible.
llvm-svn: 173928
2013-01-30 13:12:08 +00:00
Evgeniy Stepanov
eac7f934f0
[msan] Cleanup public interface header.
...
Moved everything users are not supposed to use to a private interface header.
Documented all public interfaces. Made them safe to use even if built without
MemorySanitizer.
llvm-svn: 173800
2013-01-29 14:33:29 +00:00
Evgeniy Stepanov
2538bd1901
[msan] Remove icmp tests that require exact shadow propagation.
...
llvm-svn: 173686
2013-01-28 13:45:16 +00:00
Evgeniy Stepanov
0e5becb830
[msan] Tests for ICmp handling.
...
llvm-svn: 173456
2013-01-25 15:39:11 +00:00
Kostya Serebryany
fa79cd65e2
[sanitizer] fix calloc overflow in asan/tsan/msan
...
llvm-svn: 173441
2013-01-25 11:46:22 +00:00
Evgeniy Stepanov
ffffbefa43
[msan] gethostbyname interceptor.
...
llvm-svn: 173249
2013-01-23 10:43:38 +00:00
Evgeniy Stepanov
f9a7aba34a
[msan] Simplify test code.
...
llvm-svn: 173155
2013-01-22 12:33:11 +00:00
Evgeniy Stepanov
2b65c0d1cf
[msan] Test handling of volatile bitfields.
...
llvm-svn: 173154
2013-01-22 12:31:39 +00:00
Evgeniy Stepanov
ef68259d26
[msan] Stop using volatile assignments as undef checks in MSan tests.
...
A runtime call is used instead.
MSan will stop adding shadow checks on volatile stores soon.
llvm-svn: 173152
2013-01-22 12:29:00 +00:00
Evgeniy Stepanov
222076e972
[sanitizer] Common *scanf interceptors.
...
llvm-svn: 172805
2013-01-18 11:17:23 +00:00
Evgeniy Stepanov
e3a325197a
[msan] More interceptors.
...
strtod and friends, dladdr, getrusage
llvm-svn: 172720
2013-01-17 13:42:17 +00:00
Evgeniy Stepanov
f45d92bb22
MemorySanitizer unit tests.
...
llvm-svn: 171062
2012-12-25 12:39:56 +00:00