summaryrefslogtreecommitdiff
path: root/lib/msan
Commit message (Collapse)AuthorAge
* [msan] Sanity check for non-PIE.HEADmasterEvgeniy Stepanov2013-11-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194370 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizer] Make StackTrace::Unwind the only public way to unwind a stack trace.Alexey Samsonov2013-11-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194196 91177308-0d34-0410-b5e6-96231b3b80d8
* [msan] Fix a very unfortunate typo in origin copying.Evgeniy Stepanov2013-11-05
| | | | | | | It was causing randomly missing origins. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194036 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Intercept strptime.Evgeniy Stepanov2013-11-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193903 91177308-0d34-0410-b5e6-96231b3b80d8
* [msan] Intercept memccpy.Evgeniy Stepanov2013-11-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193897 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizer] Unify summary reporting across all sanitizers.Alexey Samsonov2013-11-01
| | | | | | | | | | | This change unifies the summary printing across sanitizers: now each tool uses specific version of ReportErrorSummary() method, which deals with symbolization of the top frame and formatting a summary message. This change modifies the summary line for ASan+LSan mode: now the summary mentions "AddressSanitizer" instead of "LeakSanitizer". git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193864 91177308-0d34-0410-b5e6-96231b3b80d8
* [msan] Check that address is an app region before printing shadow.Evgeniy Stepanov2013-11-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193863 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Enhance io_submti syscall handler.Evgeniy Stepanov2013-11-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193848 91177308-0d34-0410-b5e6-96231b3b80d8
* Consistently use StackTrace::PrintStack in ASan, LSan and MSanAlexey Samsonov2013-11-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193834 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizer] Add Symbolizer::AddHooks() and use it in TSan and MSan.Alexey Samsonov2013-10-31
| | | | | | | | | | | | | | | | | | | | | Summary: TSan and MSan need to know if interceptor was called by the user code or by the symbolizer and use pre- and post-symbolization hooks for that. Make Symbolizer class responsible for calling these hooks instead. This would ensure the hooks are only called when necessary (during in-process symbolization, they are not needed for out-of-process) and save specific sanitizers from tracing all places in the code where symbolization will be performed. Reviewers: eugenis, dvyukov Reviewed By: eugenis CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2067 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193807 91177308-0d34-0410-b5e6-96231b3b80d8
* [msan] Intercept dlerror.Evgeniy Stepanov2013-10-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193760 91177308-0d34-0410-b5e6-96231b3b80d8
* [msan] Disable mlock/mlockall to work around a linux kernel bug.Evgeniy Stepanov2013-10-31
| | | | | | | The same logic is present in ASan and TSan. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193755 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Intercept getline, getdelim.Evgeniy Stepanov2013-10-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193730 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Intercept drand48_r, lrand48_r.Evgeniy Stepanov2013-10-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193655 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Intercept sincos, remquo, lgamma, lgamma_r.Evgeniy Stepanov2013-10-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193645 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Ptrace syscall handler.Evgeniy Stepanov2013-10-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193633 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan/asan: support pthread_setname_np to set thread namesDmitry Vyukov2013-10-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193602 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizer] Simplify StackTrace::PrintStack interface: prefer common flags ↵Alexey Samsonov2013-10-29
| | | | | | to turn on/off the symbolization git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193587 91177308-0d34-0410-b5e6-96231b3b80d8
* [msan] Intercept shmat.Evgeniy Stepanov2013-10-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193581 91177308-0d34-0410-b5e6-96231b3b80d8
* [msan] Fix a typo and enable poison_in_free flag.Evgeniy Stepanov2013-10-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193529 91177308-0d34-0410-b5e6-96231b3b80d8
* asan/msan: separate different report blocks with new linesDmitry Vyukov2013-10-28
| | | | | | | | this makes the reports consistent with tsan, and much more readable. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193520 91177308-0d34-0410-b5e6-96231b3b80d8
* Overhaul the symbolizer interface.Peter Collingbourne2013-10-25
| | | | | | | | | | | | | | | | | | | | | | This moves away from creating the symbolizer object and initializing the external symbolizer as separate steps. Those steps now always take place together. Sanitizers with a legacy requirement to specify their own symbolizer path should use InitSymbolizer to initialize the symbolizer with the desired path, and GetSymbolizer to access the symbolizer. Sanitizers with no such requirement (e.g. UBSan) can use GetOrInitSymbolizer with no need for initialization. The symbolizer interface has been made thread-safe (as far as I can tell) by protecting its member functions with mutexes. Finally, the symbolizer interface no longer relies on weak externals, the introduction of which was probably a mistake on my part. Differential Revision: http://llvm-reviews.chandlerc.com/D1985 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193448 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Intercept tmpnam, tmpnam_r, tempnam.Evgeniy Stepanov2013-10-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193415 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Remove pthread_attr_getstackaddr interceptor.Evgeniy Stepanov2013-10-25
| | | | | | | The function is deprecated. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193409 91177308-0d34-0410-b5e6-96231b3b80d8
* [msan] Zerofill initstate_r buffer in random_r test.Evgeniy Stepanov2013-10-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193406 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Intercept pthread_attr_get*.Evgeniy Stepanov2013-10-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193405 91177308-0d34-0410-b5e6-96231b3b80d8
* [msan] Separate access and origin blocks in msan reports with an extra ↵Evgeniy Stepanov2013-10-25
| | | | | | whiteline. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193401 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Intercept random_r.Evgeniy Stepanov2013-10-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193396 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Intercept shmctl.Evgeniy Stepanov2013-10-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193348 91177308-0d34-0410-b5e6-96231b3b80d8
* [msan] Unpoison errno in common interceptors.Evgeniy Stepanov2013-10-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193343 91177308-0d34-0410-b5e6-96231b3b80d8
* [msan] Fix invalid origin copying.Evgeniy Stepanov2013-10-24
| | | | | | | | | | | | | | | Origin copying may destroy valid origin info. This is caused by __msan_copy_origin widening the address range to the nearest 4-byte aligned addresses both on the left and on the right. If the target buffer is uninitialized and the source is fully initialized, this will result in overriding valid origin of target buffer with stale (possibly 0) origin of the source buffer. With this change the widened origin is copied only if corresponding shadow values are non zero. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193338 91177308-0d34-0410-b5e6-96231b3b80d8
* [msan] Change wording in the invalid origin message.Evgeniy Stepanov2013-10-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193335 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Intercept ether_* functions.Evgeniy Stepanov2013-10-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193241 91177308-0d34-0410-b5e6-96231b3b80d8
* [msan] Drain allocator cache when leaving thread.Evgeniy Stepanov2013-10-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193163 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Intercept initgroups.Evgeniy Stepanov2013-10-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193158 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Move statfs/fstatfs to common interceptors and add statvfs/fstatvfs.Evgeniy Stepanov2013-10-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192965 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Intercept getmntent, getmntent_r.Evgeniy Stepanov2013-10-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192959 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Fix unpoisoning of msghdr::msg_name in recvmsg interceptor.Evgeniy Stepanov2013-10-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192886 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizer] Move pthread_cond_signal and pthread_cond_broadcast to common ↵Alexey Samsonov2013-10-17
| | | | | | interceptors git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192876 91177308-0d34-0410-b5e6-96231b3b80d8
* [msan] Handle origins in __sanitizer_unaligned_(load|store)*.Evgeniy Stepanov2013-10-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192776 91177308-0d34-0410-b5e6-96231b3b80d8
* Make some pthread_mutex_* and pthread_cond_* interceptors common.Alexey Samsonov2013-10-16
| | | | | | | | | | | | Reviewers: eugenis, dvyukov Reviewed By: dvyukov CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1937 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192774 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: use verbosity flag in sanitizer_common code directlyDmitry Vyukov2013-10-15
| | | | | | | | now it's available from common_flags() git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192705 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: move verbosity flag to CommonFlagsDmitry Vyukov2013-10-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192701 91177308-0d34-0410-b5e6-96231b3b80d8
* [msan] Remove CallocOverflow test.Evgeniy Stepanov2013-10-15
| | | | | | | | This behaviour depends on MSAN_OPTIONS. All interesting combinations are covered by lit_tests/allocator_returns_null.cc. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192691 91177308-0d34-0410-b5e6-96231b3b80d8
* [msan] Implement allocator_may_return_null=1 in MemorySanitizer.Evgeniy Stepanov2013-10-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192687 91177308-0d34-0410-b5e6-96231b3b80d8
* [msan] Test for r192599.Evgeniy Stepanov2013-10-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192600 91177308-0d34-0410-b5e6-96231b3b80d8
* [msan] Remove a long-outdated comment.Evgeniy Stepanov2013-10-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192592 91177308-0d34-0410-b5e6-96231b3b80d8
* [msan] Intercept strto(d|f|ld)_l and glibc-specific __strto(d|f|ld)_l.Evgeniy Stepanov2013-10-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192583 91177308-0d34-0410-b5e6-96231b3b80d8
* [msan] Regression test for r192575.Evgeniy Stepanov2013-10-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192577 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizer] Simplify StackTrace::FastUnwindStack interface and fix a bug ↵Alexey Samsonov2013-10-11
| | | | | | with one-frame stack traces git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192428 91177308-0d34-0410-b5e6-96231b3b80d8