summaryrefslogtreecommitdiffstats
path: root/compiler-rt
Commit message (Collapse)AuthorAgeFilesLines
* Add a test checking that all the "__asan_" interface functions are present ↵Alexander Potapenko2012-08-092-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 Potapenko2012-08-091-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 wellAlexey Samsonov2012-08-093-33/+64
| | | | llvm-svn: 161576
* [ASan] Small fix to please tests on Windows, where stack unwinding using ↵Alexey Samsonov2012-08-092-15/+7
| | | | | | provided pc/bp works too bad llvm-svn: 161575
* [ASan] Move __asan_report_error implementation to asan_report.ccAlexey Samsonov2012-08-093-141/+152
| | | | llvm-svn: 161574
* Use a switch instead of a simple condition in force_interface_symbols().Alexander Potapenko2012-08-091-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.ccAlexey Samsonov2012-08-093-31/+37
| | | | llvm-svn: 161572
* [ASan] move some functions that describe addresses to asan_report.ccAlexey Samsonov2012-08-096-99/+102
| | | | llvm-svn: 161571
* [ASan] Move error reporting code away from file with interceptorsAlexey Samsonov2012-08-093-5/+16
| | | | llvm-svn: 161570
* [ASan] Move error reports away from ASan allocator. Add new source file to ↵Alexey Samsonov2012-08-094-26/+50
| | | | | | CMakeLists as well llvm-svn: 161569
* [ASan] Create new files asan_report.{h,cc} as a preparation for refactoring ↵Alexey Samsonov2012-08-093-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 Samsonov2012-08-082-26/+35
| | | | | | libraries llvm-svn: 161485
* [compiler-rt] CMake build: if LLVM_BUILD_32_BITS is on, then -m32 is added ↵Alexey Samsonov2012-08-071-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 testsuitesAlexey Samsonov2012-08-071-9/+6
| | | | llvm-svn: 161412
* [ASan] add llvm_tools_dir to lit.site.cfg for ASan and add it to PATHAlexey Samsonov2012-08-072-0/+16
| | | | llvm-svn: 161411
* [ASan] Add support for running unit tests by lit (as a part of 'make ↵Alexey Samsonov2012-08-076-10/+92
| | | | | | check-asan' command) llvm-svn: 161406
* [ASan] fix names of malloc/free replacements on AndroidAlexey Samsonov2012-08-061-1/+7
| | | | llvm-svn: 161322
* [ASan] add new ASan option 'strip_path_prefix' to remove useless prefices ↵Alexey Samsonov2012-08-065-6/+30
| | | | | | from filenames in stack traces llvm-svn: 161321
* AllocationSize(ptr) should check that |ptr| actually points to the beginning ↵Alexander Potapenko2012-08-061-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 Potapenko2012-08-021-39/+37
| | | | llvm-svn: 161181
* Some refactoring for asan_symbolize.py: introduced the Symbolizer class and ↵Alexander Potapenko2012-08-021-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 buildAlexey Samsonov2012-08-021-1/+1
| | | | llvm-svn: 161170
* Follow-up for r161168 for WindowsAlexey Samsonov2012-08-022-13/+18
| | | | llvm-svn: 161169
* [Sanitizer] Workaround for a compiler warning - ISO C++ forbids casting ↵Alexey Samsonov2012-08-025-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 Potapenko2012-08-022-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 buildAlexey Samsonov2012-08-021-2/+2
| | | | llvm-svn: 161166
* Add support for "movsbl %sil,%ecx" (x86_64) and "movsbl $imm(%ebp), %edx" ↵Alexander Potapenko2012-08-011-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 libraryAlexey Samsonov2012-08-012-2/+4
| | | | llvm-svn: 161113
* [ASan] cleanup interceptors code - prefer ASAN_INTERCEPT_FUNCTION_NAME macro ↵Alexey Samsonov2012-08-011-51/+94
| | | | | | to _WIN32, __APPLE__ etc. llvm-svn: 161109
* First tiny move towards integrating AddressSanitizer regressions test into ↵Alexey Samsonov2012-07-316-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 Potapenko2012-07-311-9/+16
| | | | llvm-svn: 161046
* [Sanitizer] Wrapper around llvm::DIContext from LLVM DebugInfo library. If a ↵Alexey Samsonov2012-07-314-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 warningAlexey Samsonov2012-07-301-1/+1
| | | | llvm-svn: 160957
* [TSan] delete trailing spacesAlexey Samsonov2012-07-301-1/+1
| | | | llvm-svn: 160955
* tsan: add ReleaseStore() function that merely copies vector clock rather ↵Dmitry Vyukov2012-07-288-7/+31
| | | | | | | | than combines two clocks fix clock setup for finalizer goroutine (Go runtime) llvm-svn: 160918
* tsan: add missing includeDmitry Vyukov2012-07-271-0/+2
| | | | llvm-svn: 160875
* tsan: change event handling from single HandleEvent() to a set of separate ↵Dmitry Vyukov2012-07-273-151/+137
| | | | | | functions (Go runtime) llvm-svn: 160863
* tasn: do not remember stack traces for sync objects for Go (they are not ↵Dmitry Vyukov2012-07-271-0/+2
| | | | | | reported anyway) llvm-svn: 160861
* tsan: remove unnecessary and wrong includeDmitry Vyukov2012-07-271-1/+0
| | | | llvm-svn: 160860
* [asan] ensure that asan_init is called in str[n]cmp. Bug found by Nick ↵Kostya Serebryany2012-07-271-0/+2
| | | | | | Kralevich (thanks) llvm-svn: 160853
* tsan: make the runtime library name tsan-neutral for Go upstreamDmitry Vyukov2012-07-261-1/+1
| | | | llvm-svn: 160797
* tsan: allow environment to override OnReport() and OverrideFlags()Dmitry Vyukov2012-07-253-3/+12
| | | | llvm-svn: 160728
* tsan: suport for Go finalizersDmitry Vyukov2012-07-255-0/+17
| | | | llvm-svn: 160723
* tsan: expect that Go symbolizer can return NULLsDmitry Vyukov2012-07-251-4/+4
| | | | llvm-svn: 160722
* cmake for compiler-rt: add a function to set output dirs for compiler ↵Alexey Samsonov2012-07-253-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 Serebryany2012-07-252-12/+10
| | | | | | chain of bugs instead of just one llvm-svn: 160719
* [ASan] fixup for r160712: provide a default definition for weak ↵Alexey Samsonov2012-07-252-14/+13
| | | | | | __asan_default_options() llvm-svn: 160718
* Make __asan_default_options a weak function that returns a const char*.Alexander Potapenko2012-07-254-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 formatDmitry Vyukov2012-07-243-16/+14
| | | | llvm-svn: 160672
* Revert r160669 (except for compile flag updates)Alexey Samsonov2012-07-241-23/+4
| | | | llvm-svn: 160671
OpenPOWER on IntegriCloud