summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/msan/msan.cc
Commit message (Collapse)AuthorAgeFilesLines
...
* [msan] Replace wrap_indirect_calls runtime flag with an interface method.Evgeniy Stepanov2013-12-201-11/+13
| | | | llvm-svn: 197799
* [msan] Disable DynamoRio detection.Evgeniy Stepanov2013-12-181-13/+1
| | | | | | | | | This code is not robust enough and triggers when simply linking with libdynamorio.so, without any code translation at all. Disabling it is safe (i.e. we may unpoison too much memory and see false negatives, but never false positives). llvm-svn: 197568
* [msan] Wrap indirect calls from sanitizer rtl when running under DR.Evgeniy Stepanov2013-12-131-0/+5
| | | | llvm-svn: 197226
* [msan] Add a check for recursive __msan_init.Evgeniy Stepanov2013-12-131-0/+1
| | | | llvm-svn: 197218
* [msan] Clean stack and TLS shadow on thread exit.Evgeniy Stepanov2013-12-121-5/+7
| | | | llvm-svn: 197156
* [msan] Get stack limits with pthread_create interceptor.Evgeniy Stepanov2013-12-111-22/+6
| | | | | | | | | | | | | Before we did it lazily on the first stack unwind in the thread. It resulted in deadlock when the unwind was caused by memory allocation inside pthread_getattr_np: pthread_getattr_np <<< not reentable GetThreadStackTopAndBottom __interceptor_realloc pthread_getattr_np llvm-svn: 197026
* [msan] Allow strlen() (and similar functions) of shadow memory.Evgeniy Stepanov2013-12-061-1/+2
| | | | llvm-svn: 196572
* [sanitizer] Introduce VReport and VPrintf macros and use them in sanitizer code.Sergey Matveev2013-12-051-8/+5
| | | | | | Instead of "if (common_flags()->verbosity) Report(...)" we now have macros. llvm-svn: 196497
* tsan: fix flags parsingDmitry Vyukov2013-11-271-2/+3
| | | | | | | | - running_on_valgrind was not parsed in some contexts - refactor code a bit - add comprehensive tests for flags parsing llvm-svn: 195831
* [msan] Fix origin tracking in unaligned load/store.Evgeniy Stepanov2013-11-191-8/+16
| | | | llvm-svn: 195130
* [Sanitizer] Specify a default value for each common runtime flagAlexey Samsonov2013-11-121-5/+1
| | | | llvm-svn: 194479
* [sanitizer] Warn if interception fails.Evgeniy Stepanov2013-11-111-3/+5
| | | | | | This includes a clang-format pass over common interceptors. llvm-svn: 194372
* [Sanitizer] Make StackTrace::Unwind the only public way to unwind a stack trace.Alexey Samsonov2013-11-071-5/+4
| | | | llvm-svn: 194196
* [msan] Check that address is an app region before printing shadow.Evgeniy Stepanov2013-11-011-0/+4
| | | | llvm-svn: 193863
* [Sanitizer] Add Symbolizer::AddHooks() and use it in TSan and MSan.Alexey Samsonov2013-10-311-0/+1
| | | | | | | | | | | | | | | | | | | | | 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 llvm-svn: 193807
* [Sanitizer] Simplify StackTrace::PrintStack interface: prefer common flags ↵Alexey Samsonov2013-10-291-0/+1
| | | | | | to turn on/off the symbolization llvm-svn: 193587
* [msan] Fix a typo and enable poison_in_free flag.Evgeniy Stepanov2013-10-281-1/+1
| | | | llvm-svn: 193529
* Overhaul the symbolizer interface.Peter Collingbourne2013-10-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | 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 llvm-svn: 193448
* [msan] Change wording in the invalid origin message.Evgeniy Stepanov2013-10-241-3/+4
| | | | llvm-svn: 193335
* [msan] Handle origins in __sanitizer_unaligned_(load|store)*.Evgeniy Stepanov2013-10-161-0/+12
| | | | llvm-svn: 192776
* tsan: move verbosity flag to CommonFlagsDmitry Vyukov2013-10-151-6/+4
| | | | llvm-svn: 192701
* [Sanitizer] Simplify StackTrace::FastUnwindStack interface and fix a bug ↵Alexey Samsonov2013-10-111-4/+1
| | | | | | with one-frame stack traces llvm-svn: 192428
* [msan] Unpoison argument shadow for C++ module destructors.Evgeniy Stepanov2013-09-271-1/+1
| | | | | | Fixes PR17377. llvm-svn: 191508
* [msan] Fix a WTF in r191196.Evgeniy Stepanov2013-09-231-1/+1
| | | | llvm-svn: 191197
* [msan] Allow nested symbolizer and loader scopes.Evgeniy Stepanov2013-09-231-6/+6
| | | | llvm-svn: 191196
* [msan] Fix origin of deallocated memory.Evgeniy Stepanov2013-09-161-0/+2
| | | | | | | | | | | MSan poisons deallocated memory but it used to give it an invalid origin value, resulting in confusing reports. This change associates deallocation stack trace with such memory. Note that MSan does not have quarantine, and use-after-free detection is very limited. llvm-svn: 190781
* [msan] Add source file:line to stack origin reports.Evgeniy Stepanov2013-09-131-6/+16
| | | | | | Runtime library part. llvm-svn: 190686
* [Sanitizer] Refactor symbolization interface: use class instead of several ↵Alexey Samsonov2013-09-101-1/+2
| | | | | | functions. Move some code around to get rid of extra source files llvm-svn: 190410
* ASan, LSan, MSan: try to find llvm-symbolizer binary in PATH if it is not ↵Alexey Samsonov2013-09-031-1/+2
| | | | | | provided. Now we don't need to explicitly set the location of llvm-symbolizer in lit test configs. llvm-svn: 189801
* [sanitizer] fix code styleAlexey Samsonov2013-08-281-1/+2
| | | | llvm-svn: 189474
* [msan] Save/restore va_arg_overflow_tls in signal handlers.Evgeniy Stepanov2013-08-271-2/+20
| | | | llvm-svn: 189351
* [msan] Unpoison all TLS shadow when leaving a signal handler.Evgeniy Stepanov2013-08-271-0/+7
| | | | llvm-svn: 189343
* tsan/msan: add halt_on_error flagDmitry Vyukov2013-08-131-5/+10
| | | | | | If halt_on_error==true, program terminates after reporting first error. llvm-svn: 188279
* Define SANITIZER_INTERFACE_ATTRIBUTE on Windows and fix all the places where ↵Timur Iskhodzhanov2013-08-131-1/+1
| | | | | | SANITIZER_INTERFACE_ATTRIBUTE or SANITIZER_ATTRIBUTE_WEAK are used llvm-svn: 188261
* [MSan] Rename __msan_unpoision_param to __msan::UnpoisonParam - it shouldn't ↵Alexey Samsonov2013-06-271-4/+4
| | | | | | be in interface llvm-svn: 185062
* [sanitizer] Move log_path to common flag and use it in MSan.Evgeniy Stepanov2013-06-251-0/+2
| | | | llvm-svn: 184836
* [msan] Add keep_going runtime flag.Evgeniy Stepanov2013-06-211-0/+12
| | | | llvm-svn: 184542
* [sanitizer] ioctl interceptor.Evgeniy Stepanov2013-06-071-0/+1
| | | | | | | ASan: disabled by default MSan: enabled by default TSan: disabled llvm-svn: 183517
* [sanitizer] Fix __sanitizer_unaligned_* to work with unaligned data types.Evgeniy Stepanov2013-06-041-18/+18
| | | | llvm-svn: 183224
* [msan] Implement __sanitizer_unaligned_*.Evgeniy Stepanov2013-06-041-0/+25
| | | | llvm-svn: 183221
* [msan] Fix gcc build of msan runtime.Evgeniy Stepanov2013-05-311-2/+1
| | | | llvm-svn: 182999
* [msan] Handle mixed track-origins and keep-going settings (compiler-rt part).Evgeniy Stepanov2013-05-311-9/+11
| | | | | | | | | | | | | Before this change, each module defined a weak_odr global __msan_track_origins with a value of 1 if origin tracking is enabled, 0 if disabled. If there are modules with different values, any of them may win. If 0 wins, and there is at least one module with 1, the program will most likely crash. With this change, __msan_track_origins is only emitted if origin tracking is on. Then runtime library detects if there is at least one module with origin tracking, and enables runtime support for it. llvm-svn: 182996
* [msan] Intercept dl_iterate_phdr.Evgeniy Stepanov2013-05-161-0/+4
| | | | llvm-svn: 182004
* [msan] Common flags in MSan.Sergey Matveev2013-05-061-12/+12
| | | | llvm-svn: 181194
* [MSan] Make a few interface functions accept 'const void *' instead of 'void*'Alexey Samsonov2013-04-231-3/+3
| | | | llvm-svn: 180102
* [msan] Conditionally disable new() and delete() wrappers.Evgeniy Stepanov2013-04-051-1/+2
| | | | | | To be used with static libstdc++. llvm-svn: 178866
* [msan] A runtime option to disable wrapping of signal handlers.Evgeniy Stepanov2013-04-051-0/+2
| | | | llvm-svn: 178865
* [libsanitizer] Unmapping the old cache partially invalidates the memory ↵Alexander Potapenko2013-03-261-1/+1
| | | | | | | | | | layout, so add a flag to skip cache update for cases when that's unacceptable (e.g. lsan). Patch by Sergey Matveev (earthdok@google.com) llvm-svn: 178000
* [msan] Options for switching between fast and cfi unwinders in run time.Evgeniy Stepanov2013-03-141-2/+7
| | | | | | Does not change default behavior. llvm-svn: 177057
* [msan] Increase stack size as required.Evgeniy Stepanov2013-03-131-0/+1
| | | | | | Adjust stack size in pthread_attr_t when the app-requested size does not fit MSan TLS. llvm-svn: 176939
OpenPOWER on IntegriCloud