Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Add a test checking that all the "__asan_" interface functions are present ↵ | Alexander Potapenko | 2012-08-09 | 2 | -1/+27 |
| | | | | | | | | in a binary built with -dead_strip. Fix force_interface_symbols() so that none of the interface symbols is stripped. llvm-svn: 161582 | ||||
* | Make the non-interface mach_override functions static to avoid name clashes ↵ | Alexander Potapenko | 2012-08-09 | 1 | -14/+20 |
| | | | | | | with user code that may contain its own mach_override. llvm-svn: 161577 | ||||
* | [ASan] Move mac-specific error reports to asan_report.cc as well | Alexey Samsonov | 2012-08-09 | 3 | -33/+64 |
| | | | | llvm-svn: 161576 | ||||
* | [ASan] Small fix to please tests on Windows, where stack unwinding using ↵ | Alexey Samsonov | 2012-08-09 | 2 | -15/+7 |
| | | | | | | provided pc/bp works too bad llvm-svn: 161575 | ||||
* | [ASan] Move __asan_report_error implementation to asan_report.cc | Alexey Samsonov | 2012-08-09 | 3 | -141/+152 |
| | | | | llvm-svn: 161574 | ||||
* | Use a switch instead of a simple condition in force_interface_symbols(). | Alexander Potapenko | 2012-08-09 | 1 | -17/+19 |
| | | | | | | Otherwise Clang eliminates everything after the first interface symbol that is marked noreturn. llvm-svn: 161573 | ||||
* | [ASan] move code that describes globals to asan_report.cc | Alexey Samsonov | 2012-08-09 | 3 | -31/+37 |
| | | | | llvm-svn: 161572 | ||||
* | [ASan] move some functions that describe addresses to asan_report.cc | Alexey Samsonov | 2012-08-09 | 6 | -99/+102 |
| | | | | llvm-svn: 161571 | ||||
* | [ASan] Move error reporting code away from file with interceptors | Alexey Samsonov | 2012-08-09 | 3 | -5/+16 |
| | | | | llvm-svn: 161570 | ||||
* | [ASan] Move error reports away from ASan allocator. Add new source file to ↵ | Alexey Samsonov | 2012-08-09 | 4 | -26/+50 |
| | | | | | | CMakeLists as well llvm-svn: 161569 | ||||
* | [ASan] Create new files asan_report.{h,cc} as a preparation for refactoring ↵ | Alexey Samsonov | 2012-08-09 | 3 | -8/+55 |
| | | | | | | | | | | | | | | | | of ASan error reporting code. Currently ASan reports many kinds of errors, and the code that actually prints error messages can be found inside allocator, OS-specific files, interceptors code etc. An example of maintenance troubles this situation causes: There is currently an ASan interface function that registers callback which should take the char buffer with error report printed by ASan. This function is now broken, as one has to insert callback calls to all the places in ASan code where the error reports are printed, surprisingly it is not only "__asan_report_error" function... llvm-svn: 161568 | ||||
* | [Sanitizer] cleanup CMake files for interception and sanitizer_common helper ↵ | Alexey Samsonov | 2012-08-08 | 2 | -26/+35 |
| | | | | | | libraries llvm-svn: 161485 | ||||
* | [compiler-rt] CMake build: if LLVM_BUILD_32_BITS is on, then -m32 is added ↵ | Alexey Samsonov | 2012-08-07 | 1 | -1/+1 |
| | | | | | | to llvm definitions. Let us override this by explicitly adding -m64 compiler flag when building compiler-rt libraries for x86_64 target llvm-svn: 161415 | ||||
* | [ASan] simplify cmake rules for adding lit testsuites | Alexey Samsonov | 2012-08-07 | 1 | -9/+6 |
| | | | | llvm-svn: 161412 | ||||
* | [ASan] add llvm_tools_dir to lit.site.cfg for ASan and add it to PATH | Alexey Samsonov | 2012-08-07 | 2 | -0/+16 |
| | | | | llvm-svn: 161411 | ||||
* | [ASan] Add support for running unit tests by lit (as a part of 'make ↵ | Alexey Samsonov | 2012-08-07 | 6 | -10/+92 |
| | | | | | | check-asan' command) llvm-svn: 161406 | ||||
* | [ASan] fix names of malloc/free replacements on Android | Alexey Samsonov | 2012-08-06 | 1 | -1/+7 |
| | | | | llvm-svn: 161322 | ||||
* | [ASan] add new ASan option 'strip_path_prefix' to remove useless prefices ↵ | Alexey Samsonov | 2012-08-06 | 5 | -6/+30 |
| | | | | | | from filenames in stack traces llvm-svn: 161321 | ||||
* | AllocationSize(ptr) should check that |ptr| actually points to the beginning ↵ | Alexander Potapenko | 2012-08-06 | 1 | -4/+5 |
| | | | | | | | | of the chunk it belongs to. Fixes http://code.google.com/p/address-sanitizer/issues/detail?id=86 llvm-svn: 161320 | ||||
* | Implement LinuxSymbolizer instead of symbolize_addr2line. | Alexander Potapenko | 2012-08-02 | 1 | -39/+37 |
| | | | | llvm-svn: 161181 | ||||
* | Some refactoring for asan_symbolize.py: introduced the Symbolizer class and ↵ | Alexander Potapenko | 2012-08-02 | 1 | -59/+184 |
| | | | | | | | | implemented DarwinSymbolizer for atos-based symbolization, BreakpadSymbolizer for breakpad-based symbolization (files produced by the dump_syms tool, http://code.google.com/p/google-breakpad/source/browse/#svn%2Ftrunk%2Fsrc%2Ftools%2Fmac%2Fdump_syms) and ChainSymbolizer to allow falling back if a symbolizer hadn't succeeded. Fixed pylint warnings. llvm-svn: 161176 | ||||
* | [Sanitizer] fix windows build | Alexey Samsonov | 2012-08-02 | 1 | -1/+1 |
| | | | | llvm-svn: 161170 | ||||
* | Follow-up for r161168 for Windows | Alexey Samsonov | 2012-08-02 | 2 | -13/+18 |
| | | | | llvm-svn: 161169 | ||||
* | [Sanitizer] Workaround for a compiler warning - ISO C++ forbids casting ↵ | Alexey Samsonov | 2012-08-02 | 5 | -18/+30 |
| | | | | | | pointer-to-function to pointer-to-object, so we use cast via integral type llvm-svn: 161168 | ||||
* | Make strcat() and strncat() more standard-compliant (check for invalid ↵ | Alexander Potapenko | 2012-08-02 | 2 | -14/+22 |
| | | | | | | | | parameters even if zero bytes is copied, more accurate overlap check) Fix the tests that were relying on the incorrect behavior. llvm-svn: 161167 | ||||
* | [Sanitizer] Fix warnings to please cmake build | Alexey Samsonov | 2012-08-02 | 1 | -2/+2 |
| | | | | llvm-svn: 161166 | ||||
* | Add support for "movsbl %sil,%ecx" (x86_64) and "movsbl $imm(%ebp), %edx" ↵ | Alexander Potapenko | 2012-08-01 | 1 | -1/+3 |
| | | | | | | | | (i386) to our fork of mach_override. This is an extended version of a patch by Rafael Avila de Espindola (rafael.espindola@gmail.com) llvm-svn: 161116 | ||||
* | [Sanitizer] Make ASan/TSan sources depend on headers from interception library | Alexey Samsonov | 2012-08-01 | 2 | -2/+4 |
| | | | | llvm-svn: 161113 | ||||
* | [ASan] cleanup interceptors code - prefer ASAN_INTERCEPT_FUNCTION_NAME macro ↵ | Alexey Samsonov | 2012-08-01 | 1 | -51/+94 |
| | | | | | | to _WIN32, __APPLE__ etc. llvm-svn: 161109 | ||||
* | First tiny move towards integrating AddressSanitizer regressions test into ↵ | Alexey Samsonov | 2012-07-31 | 6 | -0/+138 |
| | | | | | | | | | | | | | | LLVM lit-based testing infrastructure. The goal is to be able to run ASan tests by simply running "make check-asan" command from CMake build tree: * tests should use fresh clang binary from current build tree. * tests should use the same RUN-lines syntax as llvm/clang reg tests. Next steps: - restricting tests to machines where target is equal to host, i.e. where we can produce working binaries. - moving AddressSanitizer unit tests to lit as well. llvm-svn: 161050 | ||||
* | Factor out the main() function. | Alexander Potapenko | 2012-07-31 | 1 | -9/+16 |
| | | | | llvm-svn: 161046 | ||||
* | [Sanitizer] Wrapper around llvm::DIContext from LLVM DebugInfo library. If a ↵ | Alexey Samsonov | 2012-07-31 | 4 | -16/+126 |
| | | | | | | macro SANITIZER_USES_LLVM_LIBS is defined (by default it is not), then sanitizer runtime includes llvm headers and tries to use LLVM libs for in-process symbolization. To make it functional, we have to link with these LLVM libs - either pass them to linker from Clang driver, or link them into static ASan runtime when we build it. llvm-svn: 161045 | ||||
* | [ASan] fix cmake build warning | Alexey Samsonov | 2012-07-30 | 1 | -1/+1 |
| | | | | llvm-svn: 160957 | ||||
* | [TSan] delete trailing spaces | Alexey Samsonov | 2012-07-30 | 1 | -1/+1 |
| | | | | llvm-svn: 160955 | ||||
* | tsan: add ReleaseStore() function that merely copies vector clock rather ↵ | Dmitry Vyukov | 2012-07-28 | 8 | -7/+31 |
| | | | | | | | | than combines two clocks fix clock setup for finalizer goroutine (Go runtime) llvm-svn: 160918 | ||||
* | tsan: add missing include | Dmitry Vyukov | 2012-07-27 | 1 | -0/+2 |
| | | | | llvm-svn: 160875 | ||||
* | tsan: change event handling from single HandleEvent() to a set of separate ↵ | Dmitry Vyukov | 2012-07-27 | 3 | -151/+137 |
| | | | | | | functions (Go runtime) llvm-svn: 160863 | ||||
* | tasn: do not remember stack traces for sync objects for Go (they are not ↵ | Dmitry Vyukov | 2012-07-27 | 1 | -0/+2 |
| | | | | | | reported anyway) llvm-svn: 160861 | ||||
* | tsan: remove unnecessary and wrong include | Dmitry Vyukov | 2012-07-27 | 1 | -1/+0 |
| | | | | llvm-svn: 160860 | ||||
* | [asan] ensure that asan_init is called in str[n]cmp. Bug found by Nick ↵ | Kostya Serebryany | 2012-07-27 | 1 | -0/+2 |
| | | | | | | Kralevich (thanks) llvm-svn: 160853 | ||||
* | tsan: make the runtime library name tsan-neutral for Go upstream | Dmitry Vyukov | 2012-07-26 | 1 | -1/+1 |
| | | | | llvm-svn: 160797 | ||||
* | tsan: allow environment to override OnReport() and OverrideFlags() | Dmitry Vyukov | 2012-07-25 | 3 | -3/+12 |
| | | | | llvm-svn: 160728 | ||||
* | tsan: suport for Go finalizers | Dmitry Vyukov | 2012-07-25 | 5 | -0/+17 |
| | | | | llvm-svn: 160723 | ||||
* | tsan: expect that Go symbolizer can return NULLs | Dmitry Vyukov | 2012-07-25 | 1 | -4/+4 |
| | | | | llvm-svn: 160722 | ||||
* | cmake for compiler-rt: add a function to set output dirs for compiler ↵ | Alexey Samsonov | 2012-07-25 | 3 | -1/+28 |
| | | | | | | runtimes equal to directory used by Clang driver. Use it for ASan runtime. Also, make sure that ASan unit tests depend on the ASan runtime. llvm-svn: 160721 | ||||
* | [asan] don't return from a never-return function. fix a test that had a ↵ | Kostya Serebryany | 2012-07-25 | 2 | -12/+10 |
| | | | | | | chain of bugs instead of just one llvm-svn: 160719 | ||||
* | [ASan] fixup for r160712: provide a default definition for weak ↵ | Alexey Samsonov | 2012-07-25 | 2 | -14/+13 |
| | | | | | | __asan_default_options() llvm-svn: 160718 | ||||
* | Make __asan_default_options a weak function that returns a const char*. | Alexander Potapenko | 2012-07-25 | 4 | -3/+18 |
| | | | | | | | | | Users may define it to override the default ASan options. This function has to be marked with __attribute__((no_address_safety_analysis)), because it is called before ASan is fully initialized. Add an output test checking the __asan_default_options functionality. llvm-svn: 160712 | ||||
* | tsan: align report style with Go internal format | Dmitry Vyukov | 2012-07-24 | 3 | -16/+14 |
| | | | | llvm-svn: 160672 | ||||
* | Revert r160669 (except for compile flag updates) | Alexey Samsonov | 2012-07-24 | 1 | -23/+4 |
| | | | | llvm-svn: 160671 |