Commit Graph

1090 Commits

Author SHA1 Message Date
Alexey Samsonov c835b9e4a3 [ASan] test blacklist functionality for global-init-order checker (r167725)
llvm-svn: 167727
2012-11-12 14:03:00 +00:00
Alexander Potapenko 9448581d9e [ASan] Remove llvm-symbolizer from compiler-rt/utils/
This is the first (1/2) part of a change that moves llvm-symbolizer to llvm/tools/, which will allow to build it
with both cmake and configure+make.

llvm-svn: 167722
2012-11-12 11:32:42 +00:00
Alexander Potapenko 5066c5d9b7 [ASan] Fix the golden stack for use-after-free.cc.
The change has been caused by the switch to llvm-symbolizer, that prints inlined stack frames.
This should fix PR 14251

llvm-svn: 167721
2012-11-12 11:27:24 +00:00
Dmitry Vyukov 317f39290d tsan: intercept gettimeofday()
llvm-svn: 167630
2012-11-09 19:55:06 +00:00
Alexey Samsonov ae9b18b607 [Sanitizer] add sanity checks for communication with external symbolizer
llvm-svn: 167617
2012-11-09 14:45:30 +00:00
Dmitry Vyukov 805006b0ab tsan: switch to new memory_order constants (ABI compatible)
llvm-svn: 167614
2012-11-09 14:11:51 +00:00
Dmitry Vyukov 4e5f72d380 tsan: add __tsan_atomicX_compare_exchange_val() function
It's easier to call from compiler module.

llvm-svn: 167611
2012-11-09 12:54:37 +00:00
Alexander Potapenko 4b8e32de12 Add a possible underscore before the wrappers to the output expectations for Darwin
llvm-svn: 167610
2012-11-09 11:55:33 +00:00
Dmitry Vyukov 26216e4ae3 tsan: add range access functions for Go
llvm-svn: 167580
2012-11-08 13:38:45 +00:00
Alexey Samsonov 37119db20a [ASan] avoid including <new> header in ASan runtime
llvm-svn: 167579
2012-11-08 13:31:19 +00:00
Dmitry Vyukov e829b6231a tsan: change TSAN_OPTIONS->GORACE in build script as well
llvm-svn: 167578
2012-11-08 13:23:13 +00:00
Alexey Samsonov c463f3077e [Sanitizer] try to fix Windows bot - include stdlib.h for abort/_exit functions
llvm-svn: 167577
2012-11-08 13:08:41 +00:00
Dmitry Vyukov 9952b674ca tsan: use GORACE env for options for Go
llvm-svn: 167575
2012-11-08 11:32:40 +00:00
Dmitry Vyukov 67dc5702f8 tsan: do not sleep at exit if there are no other threads
llvm-svn: 167533
2012-11-07 16:41:57 +00:00
Dmitry Vyukov ea4f1990e1 tsan: add flag to suppress all reports (useful for benchmarking)
llvm-svn: 167532
2012-11-07 16:14:12 +00:00
Dmitry Vyukov e11f2920c9 tsan: more precise handling of finalizers
llvm-svn: 167530
2012-11-07 15:08:20 +00:00
Dmitry Vyukov da78be74f3 tsan: slightly relax requirements for lazy shadow memory (can overlap and may not be properly aligned)
it's problematic on windows where allocation granularity is much larger than page size

llvm-svn: 167466
2012-11-06 16:48:46 +00:00
Dmitry Vyukov c015712992 tsan: lazily allocate shadow for Go
llvm-svn: 167464
2012-11-06 16:00:16 +00:00
Dmitry Vyukov e86c632015 tsan: fix debug output
llvm-svn: 167463
2012-11-06 15:54:34 +00:00
Dmitry Vyukov a0be3e2c68 tsan: better diagnostics for failed mmap()
llvm-svn: 167462
2012-11-06 15:39:16 +00:00
Dmitry Vyukov 95b9a362ff tsan: fix compiler warning
llvm-svn: 167458
2012-11-06 14:05:20 +00:00
Dmitry Vyukov e4c2fd4c2f tsan: windows platform support
llvm-svn: 167457
2012-11-06 13:35:02 +00:00
Dmitry Vyukov 7234a5b54d tsan: update script to support windows
llvm-svn: 167456
2012-11-06 13:32:53 +00:00
Dmitry Vyukov 5f93416c94 tsan: add shadow mapping for windows
llvm-svn: 167455
2012-11-06 13:26:57 +00:00
Dmitry Vyukov ee563c10c6 tsan: add missing function for windows
llvm-svn: 167454
2012-11-06 13:25:05 +00:00
Dmitry Vyukov 1d4120b210 tsan: fix constant types
llvm-svn: 167453
2012-11-06 13:21:06 +00:00
Dmitry Vyukov 0ff6d2dd6c tsan: windows: less includes, better diagnostics for failed VirtualAlloc(), implement sched_yield()
llvm-svn: 167452
2012-11-06 13:19:59 +00:00
Dmitry Vyukov ba827dfdae tsan: don't release disabled clocks
llvm-svn: 167451
2012-11-06 13:16:25 +00:00
Dmitry Vyukov 2817639411 tsan: define missing compier macros for windows
llvm-svn: 167450
2012-11-06 12:54:16 +00:00
Dmitry Vyukov e9bafdf5b8 tsan: fix non-msvc windows build
llvm-svn: 167449
2012-11-06 12:50:13 +00:00
Dmitry Vyukov 04dd4b7349 tasn: improve sanitizer_internal_defs.h
The file uses namespaces and extern "LANG", so it's kinda senseless to use #ifdef __cplusplus

llvm-svn: 167448
2012-11-06 12:49:22 +00:00
Dmitry Vyukov e6b5a696e3 tsan: fix windows build
__declspec is not _WIN32, it's _MSC_VER

llvm-svn: 167447
2012-11-06 12:47:42 +00:00
Dmitry Vyukov 1ec08f3627 tsan: fix Go build
llvm-svn: 167446
2012-11-06 12:46:26 +00:00
Richard Smith 77930919ad Update compiler-rt tests to match flag renaming/deprecation in Clang.
llvm-svn: 167434
2012-11-06 02:31:42 +00:00
Alexey Samsonov 58358897a3 [Sanitizer] Add internal_isatty to sanitizer_libc and PrintsToTty to determine whether error reports are printed to terminal
llvm-svn: 167298
2012-11-02 15:18:34 +00:00
Alexey Samsonov f7a24c4e2b [Sanitizer] fix printf unittest on 32-bit arch
llvm-svn: 167297
2012-11-02 14:28:17 +00:00
Alexey Samsonov 008274440a [Sanitizer] move unit test for Printf from tsan to sanitizer_common
llvm-svn: 167296
2012-11-02 12:36:11 +00:00
Alexey Samsonov ad9d65feb8 [TSan] finally remove TsanPrintf in favor of Printf from sanitizer_common
llvm-svn: 167294
2012-11-02 12:17:51 +00:00
Alexey Samsonov 20ba98fdb1 [Sanitizer] Use kStderrFd constant instead of hardcoded 2
llvm-svn: 167291
2012-11-02 09:38:47 +00:00
Alexey Samsonov fd67c83e7e [Sanitizer]: add __sanitizer_set_report_fd function to alter file descriptor for error reports
llvm-svn: 167290
2012-11-02 09:23:36 +00:00
Alexey Samsonov 0c8b755839 Flag -ccc-clang-cxx was removed in r166986, remove it from compiler-rt lit configs
llvm-svn: 167010
2012-10-30 10:06:42 +00:00
Richard Smith 8f4d7eb518 Consistently declare 'extern "C"' variable in namespace __ubsan. No functionality change.
llvm-svn: 166966
2012-10-29 21:01:59 +00:00
Richard Smith f0aac0b99e Don't define an extern "C" variable in its first declaration, to appease a
bogus gcc warning. Take this opportunity to move the declaration to the header,
since it's part of the API of this file.

llvm-svn: 166965
2012-10-29 20:54:34 +00:00
Alexander Potapenko dda4f0b593 Fix a compiler warning in internal_memmove.
llvm-svn: 166775
2012-10-26 13:47:36 +00:00
Alexander Potapenko 2a1925852d Fix the internal_memmove() implementation that used to skip src[0] if dst < src.
llvm-svn: 166774
2012-10-26 13:24:20 +00:00
Alexey Samsonov 23b9199776 [ASan] don't run hacky test for __asan_get_free_bytes() on 32-bits
llvm-svn: 166771
2012-10-26 12:10:24 +00:00
Alexander Potapenko 99843d3a29 In the dynamic runtime on Mac OS, do not call internal_strdup() before __asan_init().
This may result in a crash at startup.
Fixes http://code.google.com/p/address-sanitizer/issues/detail?id=123.

llvm-svn: 166768
2012-10-26 11:31:14 +00:00
Richard Smith 2f0d7d564c -fcatch-undefined-behavior checking for appropriate vptr value: library side.
llvm-svn: 166660
2012-10-25 02:07:02 +00:00
Alexander Potapenko 1eef2b813c [ASan] Rename ReplaceCFAllocator to MaybeReplaceCFAllocator.
Replace the allocator only if the replace_cfallocator flag is set (in some cases it wasn't checked)

llvm-svn: 166550
2012-10-24 09:35:23 +00:00
Alexander Potapenko faa9c86fd0 [ASan] Use internal_memmove() in both static and dynamic runtime libraries if asan_inited != 0.
llvm-svn: 166549
2012-10-24 09:19:16 +00:00