Commit Graph

5208 Commits

Author SHA1 Message Date
Viktor Kutuzov 1a3889da34 [Sanitizers] Intercept memrchr() on FreeBSD
Committed unreviewed with permission.

llvm-svn: 227794
2015-02-02 09:58:30 +00:00
Viktor Kutuzov bb8bd90b06 [Sanitizers] Intercept getpwnam_r() on FreeBSD
Committed unreviewed with permission.

llvm-svn: 227793
2015-02-02 09:56:11 +00:00
Viktor Kutuzov 3ac0eb7480 [Sanitizers] Intercept getpwent_r() on FreeBSD
Committed unreviewed with permission.

llvm-svn: 227792
2015-02-02 09:53:02 +00:00
Viktor Kutuzov fc44a096a9 [Sanitizers] Intercept getpwent() on FreeBSD
Committed unreviewed with permission.

llvm-svn: 227791
2015-02-02 09:49:28 +00:00
Viktor Kutuzov 0c0ebaa79f [Msan] Disable unit tests for non-FreeBSD functions on FreeBSD
Differential Revision: http://reviews.llvm.org/D7252

llvm-svn: 227790
2015-02-02 09:46:07 +00:00
Viktor Kutuzov 7891c8c173 [Sanitizers] Re-apply the fix ordering initialization of coverage and guard arrays
Original commit: http://reviews.llvm.org/rL226440
Related review: http://reviews.llvm.org/D6892

llvm-svn: 227789
2015-02-02 09:38:10 +00:00
Kumar Sukhani 14a4f24d2c [asan][mips] Fix MIPS64 Asan mapping
llvm-svn: 227683
2015-01-31 09:13:58 +00:00
Alexey Samsonov e41a26e4b4 Revert "Remove unused function."
This reverts commit r227633. SetEnv was prematurely deleted.

llvm-svn: 227665
2015-01-31 01:27:18 +00:00
Alexey Samsonov a11a86b9ce [TSan] Fix Go build.
llvm-svn: 227634
2015-01-30 23:04:57 +00:00
Alexey Samsonov df0b22c5a8 Remove unused function.
llvm-svn: 227633
2015-01-30 23:04:54 +00:00
Viktor Kutuzov 6fe85cbb8e [Sanitizers] Intercept gethost functions on FreeBSD
Committed unreviewed with permission.

llvm-svn: 227572
2015-01-30 12:58:37 +00:00
Viktor Kutuzov c97b1e7c32 [Msan] Fix the shmctl unit tests to pass on FreeBSD
Differential Revision: http://reviews.llvm.org/D7253

llvm-svn: 227571
2015-01-30 12:55:40 +00:00
Viktor Kutuzov 07e6c00171 [Sanitizers] Introduce GET_LINK_MAP_BY_DLOPEN_HANDLE() macro
Differential Revision: http://reviews.llvm.org/D7233

llvm-svn: 227570
2015-01-30 12:43:52 +00:00
Yury Gribov 2bbad68617 [Sanitizer] Make BlockingMutex really linker initialized.
Differential Revision: http://reviews.llvm.org/D7171

llvm-svn: 227560
2015-01-30 06:20:43 +00:00
Yury Gribov 640017411c Replace code dup with a macro.
Differential Revision: http://reviews.llvm.org/D7172

llvm-svn: 227559
2015-01-30 06:18:46 +00:00
Alexey Samsonov 8b3334d909 [TSan] Fix -Werror=sign-compare warning. NFC.
llvm-svn: 227527
2015-01-30 01:02:12 +00:00
Kuba Brecka 0f776b0905 [compiler-rt] OS X: Update the CMake and Make builds to explicitely use libc++, mmacosx-version-min and SDKs
In both CMake and Makefiles, we are inconsistent about the use of libstdc++ vs. libc++, SDKs and minimum deployment targets for OS X. Let's fix the detection of SDKs, and let's explicitely set that we link against libc++ and mmacosx-version-min is 10.7.

llvm-svn: 227509
2015-01-29 23:19:26 +00:00
Alexey Samsonov 807f1b539c [CMake] Get rid of TARGET_64_BIT_CFLAGS: explicitly list required flags for each architecture.
llvm-svn: 227496
2015-01-29 21:32:34 +00:00
Evgeniy Stepanov 6037579926 [asan] Add one more wait-for-device in the Android setup script.
llvm-svn: 227473
2015-01-29 17:24:21 +00:00
Kostya Serebryany 3c052cc051 [asan] use getrusage as an alternative to reading /proc/self/statm. Also move GetRSS to sanitizer_linux_libcdep.cc (no change in the function itself)
llvm-svn: 227416
2015-01-29 02:54:39 +00:00
Alexey Samsonov 7f25a40550 [ASan] Generalize/simplify lit test configs generation.
llvm-svn: 227413
2015-01-29 02:28:53 +00:00
Kostya Serebryany 21a1a23790 [sanitizer] allow to reset the bb/edge coverage data inside the process while it is running (single-threaded). Also expose the current coverage set to the process.
llvm-svn: 227387
2015-01-28 22:39:44 +00:00
Nico Weber 64a74bf1cf Fix indents on asan_symbolize.py's argument parsing code. No behavior change.
llvm-svn: 227327
2015-01-28 17:29:57 +00:00
Nico Weber 406f640a68 Make asan_symbolize.py not crash on Windows.
asan_symbolize.py isn't needed on Windows, but it's nice if asan has a unified
UI on all platforms. So rather than have asan_symolize.py die on startup due to
it importing modules that don't exist on Windows, let it just echo the input.

llvm-svn: 227326
2015-01-28 17:28:04 +00:00
Alexey Samsonov 605f2df106 [ASan] Fix test cases: don't assume that fast unwinder can't unwind through libc.
llvm-svn: 227265
2015-01-27 23:06:48 +00:00
Alexey Samsonov e745728fad [ASan] Fix use-after-scope in COMMON_INTERCEPTOR_ENTER implementation.
Make sure "void *ctx" doesn't point to an object which already went out
of scope. This might also fix -Wuninitialized warnings GCC 4.7 produces
while building ASan runtime.

llvm-svn: 227258
2015-01-27 22:50:19 +00:00
Dmitry Vyukov 312ad250ff tsan: properly instrument unaligned accesses
If a memory access is unaligned, emit __tsan_unaligned_read/write
callbacks instead of __tsan_read/write.
Required to change semantics of __tsan_unaligned_read/write to not do the user memory.
But since they were unused (other than through __sanitizer_unaligned_load/store) this is fine.
Fixes long standing issue 17:
https://code.google.com/p/thread-sanitizer/issues/detail?id=17

llvm-svn: 227230
2015-01-27 20:19:12 +00:00
Justin Bogner 91487e80c8 profile: add lib/profile to cc_kext on darwin,arm64
These functions are already present in the cc_kext for arm32 and for x86 and
x86_64.  It was an oversight that they were not included for arm64.

Based on a patch by Lawrence D'Anna. Thanks!

llvm-svn: 227206
2015-01-27 17:10:07 +00:00
Evgeniy Stepanov 0bc26c0934 Revert r226440.
It was fixed the right way in r227195.

llvm-svn: 227196
2015-01-27 15:06:54 +00:00
Evgeniy Stepanov 8441bb239f [msan] Refactor memory layout specification and setup.
A flexible way of describing MSan memory layout details on various
platforms. No significant functional changes, but the memory layout
description that you get at verbosity=1 looks slightly different.
This change includes stronger sanity checks than before.

The goal of this change is to allow more than 2 application memory
ranges for https://code.google.com/p/memory-sanitizer/issues/detail?id=76.

llvm-svn: 227192
2015-01-27 13:20:34 +00:00
Dmitry Vyukov d6e0f8b6ca tsan: add test for ANNOTATE_HAPPENS_BEFORE/AFTER annotations
llvm-svn: 227190
2015-01-27 13:03:18 +00:00
Mohit K. Bhakkad 6fe5700f6b [MSan] Enable MSan unit tests for all archs
Reviewers: Reviewers: eugenis, kcc, samsonov, petarj

Subscribers: dsanders, sagar, lldb-commits

Differential Revision: http://reviews.llvm.org/D7194

llvm-svn: 227189
2015-01-27 12:38:25 +00:00
Kuba Brecka aa772feb8e [ASan] Use rpath in tests that produce a shared library
Modifying Darwin/interception-in-shared-lib-test.cc and suppressions-library.cc
to use rpath instead of linking against the full path to the temporary file.
NFC.

llvm-svn: 227161
2015-01-27 01:29:18 +00:00
Viktor Kutuzov e8dd0ca483 [Msan] Disable the ppoll unit test on FreeBSD
Differential Revision: http://reviews.llvm.org/D7145

llvm-svn: 227106
2015-01-26 18:05:54 +00:00
Viktor Kutuzov 965918e7d4 [Msan] Fix the statfs unit test to pass on FreeBSD
Differential Revision: http://reviews.llvm.org/D7144

llvm-svn: 227100
2015-01-26 17:31:23 +00:00
David Blaikie b26513950d Fix up test cases to account for improved column fidelity provided by clang
llvm-svn: 227033
2015-01-25 04:39:06 +00:00
Sergey Matveev f4e33cc9bb [sanitizer] Update descriptor size for glibc 2.13.
See https://code.google.com/p/address-sanitizer/issues/detail?id=361

It's still not clear whether the values are correct in all cases, but at least
this should unbreak our bots.

llvm-svn: 226938
2015-01-23 21:12:39 +00:00
Kuba Brecka 9a36b3e147 [compiler-rt] Ensure AsanInitFromRtl is called from a static initializer on OS X by using ASAN_DYNAMIC=1
The idea is to ensure that the ASan runtime gets initialized early (i.e.
before other initializers/constructors) even when DYLD_INSERT_LIBRARIES
is not used. In that case, the interceptors are not installed (on OS X,
DYLD_INSERT_LIBRARIES is required for interceptors to work), and therefore
ASan gets currently initialized quite late -- from the main executable's
module initializer. The following issues are a consequence of this:

  https://code.google.com/p/address-sanitizer/issues/detail?id=363
  https://code.google.com/p/address-sanitizer/issues/detail?id=357

Both of them are fixed with this patch.

Reviewed at http://reviews.llvm.org/D7117

llvm-svn: 226929
2015-01-23 19:29:19 +00:00
Kuba Brecka f1397fa7d7 [compiler-rt] Fix the prototype of ioctl interceptor
The interceptor of ioctl is using a non-standard prototype:

  INTERCEPTOR(int, ioctl, int d, unsigned request, void *arg)

At least on OS X, the request argument should be unsigned long and not 
just unsigned, and also instead of the last argument (arg), the function
should be accepting a variable number of arguments, so the prototype
should be:

  int ioctl(int fildes, unsigned long request, ...);

We can still keep using `unsigned` internally to save space, because we
know that all possible values of `request` will fit into it.

Reviewed at http://reviews.llvm.org/D7038

llvm-svn: 226926
2015-01-23 19:17:20 +00:00
Evgeniy Stepanov d486e09d8e [sanitizer] Fix an edge case in MemoryRangeIsAvailable.
llvm-svn: 226913
2015-01-23 15:14:27 +00:00
Viktor Kutuzov 8f6001bf59 [Sanitizers] Intercept statfs() on FreeBSD
Committed unreviewed with permission.

llvm-svn: 226910
2015-01-23 14:39:23 +00:00
Kuba Brecka 4edeced078 Fix the extra whitespace from r226878.
llvm-svn: 226884
2015-01-23 00:14:22 +00:00
Kuba Brecka 405de4ae10 Fix/workaround for OS X truncated stacktraces taken by external tools
This patch is a proposed solution for https://code.google.com/p/address-sanitizer/issues/detail?id=375:

When the stacktraces are captured and printed by ASan itself, they are fine, but when the program has already printed the report (or is just printing it), capturing a stacktrace via other means is broken. "Other means" include OS X CrashReporter, debuggers or calling backtrace() within the program. For example calling backtrace() from a sanitizer_set_death_callback function prints a very truncated stacktrace.

Reviewed at http://reviews.llvm.org/D7103

llvm-svn: 226878
2015-01-22 23:36:47 +00:00
Evgeniy Stepanov 0729053dac [sanitizer] Move sched_getparam test under Linux/.
llvm-svn: 226832
2015-01-22 15:34:50 +00:00
Timur Iskhodzhanov 23cfd6ecff [ASan/Win] Fix PR20944 -- run ASan gtests as part of check-asan on Windows
llvm-svn: 226831
2015-01-22 14:54:22 +00:00
Dmitry Vyukov 48846ba570 tsan: use hacky call only on x86_64
required for mips64 and aarch64 ports

llvm-svn: 226829
2015-01-22 14:13:56 +00:00
Evgeniy Stepanov 229984947b [sanitizer] Intercept sched_getparam.
llvm-svn: 226827
2015-01-22 14:03:07 +00:00
Evgeniy Stepanov 8eb8204e3f [sanitizer] Fix windows build.
llvm-svn: 226825
2015-01-22 13:47:12 +00:00
Evgeniy Stepanov d38af30b74 [msan] Better use-after-free reports.
By attaching an extra integer tag to heap origins, we are able
to distinguish between uninits
 - created by heap allocation,
 - created by heap deallocation (i.e. use-after-free),
 - created by __msan_allocated_memory call,
 - etc.

See https://code.google.com/p/memory-sanitizer/issues/detail?id=35.

llvm-svn: 226821
2015-01-22 13:33:16 +00:00
Timur Iskhodzhanov b4b6b74079 [ASan/Win] Move the shadow to 0x30000000
llvm-svn: 226809
2015-01-22 12:24:21 +00:00
Timur Iskhodzhanov 841572e90a [ASan] Print out the shadow memory range on shadow mapping failures
llvm-svn: 226807
2015-01-22 12:05:27 +00:00
Evgeniy Stepanov a6b279546d [msan] Relax CHECK conditions in 2 tests.
Sometimes malloc/realloc/etc are symbolized as
__interceptor_malloc/realloc/etc.

llvm-svn: 226803
2015-01-22 09:27:00 +00:00
Viktor Kutuzov b7766be002 [Msan] Fix the readv and preadv unit tests to pass on FreeBSD
Differential Revision: http://reviews.llvm.org/D7091

llvm-svn: 226801
2015-01-22 09:00:46 +00:00
Viktor Kutuzov ed9a90b7c8 [Msan] Fix the strerror_r unit test to build on FreeBSD
Differential Revision: http://reviews.llvm.org/D7089

llvm-svn: 226800
2015-01-22 08:57:59 +00:00
Viktor Kutuzov e787b141e7 [Msan] Fix the DynRet unit test to build on FreeBSD
Differential Revision: http://reviews.llvm.org/D7086

llvm-svn: 226799
2015-01-22 08:54:03 +00:00
Viktor Kutuzov 75a52451e8 [Sanitizers] Fix inet_aton() and inet_pton() interceptors to work on FreeBSD
Differential Revision: http://reviews.llvm.org/D7084

llvm-svn: 226796
2015-01-22 08:51:07 +00:00
Viktor Kutuzov 3f68fae900 [Sanitizers] Intercept preadv() on FreeBSD
Committed unreviewed with permission.

llvm-svn: 226794
2015-01-22 08:47:54 +00:00
Evgeniy Stepanov 844f5828e9 [msan] Fix origins in realloc.
Fixes 2 issues in origins arising from realloc() calls:
 * In the in-place grow case origin for the new memory is not set at all.
 * In the copy-realloc case __msan_memcpy is used, which unwinds stack from
   inside the MSan runtime. This does not generally work (as we may be built
   w/o frame pointers), and produces "bad" stack trace anyway, with several
   uninteresting (internal) frames on top.

This change also makes realloc() honor "zeroise" and "poison_in_malloc" flags.

See https://code.google.com/p/memory-sanitizer/issues/detail?id=73.

llvm-svn: 226674
2015-01-21 16:48:29 +00:00
Evgeniy Stepanov 84adb5d1d0 [msan] Refactor shadow operations.
Move a bunch of functions to a new source file and rename some of them for
consistency. No functional changes.

llvm-svn: 226673
2015-01-21 16:42:30 +00:00
Dmitry Vyukov 3ab6b2347e tsan: remove sleeps from tests
Even sleep(1) lead to episodical flakes on some machines.
Use an invisible by tsan barrier to enforce required execution order instead.
This makes the tests deterministic and faster.

llvm-svn: 226659
2015-01-21 13:50:02 +00:00
Evgeniy Stepanov 79ca0fd1a0 [msan] Update origin for the entire destination range on memory store.
Previously we always stored 4 bytes of origin at the destination address
even for 8-byte (and longer) stores.

This should fix rare missing, or incorrect, origin stacks in MSan reports.

llvm-svn: 226658
2015-01-21 13:21:31 +00:00
Alexander Potapenko cb273921de [ASan] Fix the test expectations for dyld_insert_libraries_reexec.cc
llvm-svn: 226651
2015-01-21 10:04:41 +00:00
Viktor Kutuzov d518cb76ad [Msan] Fix the accept unit test to pass on FreeBSD
Differential Revision: http://reviews.llvm.org/D7083

llvm-svn: 226650
2015-01-21 09:46:21 +00:00
Viktor Kutuzov f6894e9c2c [Sanitizers] Intercept confstr() on FreeBSD
Committed unreviewed with permission.

llvm-svn: 226649
2015-01-21 08:56:40 +00:00
Viktor Kutuzov 1f01782e5c [Sanitizers] Intercept opendir()
Differential Revision: http://reviews.llvm.org/D6968

llvm-svn: 226648
2015-01-21 08:54:01 +00:00
Dmitry Vyukov 8070ac6bd6 tsan: don't unroll memory access loop in debug mode
MemoryAccess function consumes ~4K of stack in debug mode,
in significant part due to the unrolled loop.
And gtest gives only 4K of stack to death test
threads, which causes stack overflows in debug mode.

llvm-svn: 226644
2015-01-21 08:09:13 +00:00
Kostya Serebryany 82b58712c1 [sanitizer] First step toward supporting 42-bit AS on aarch64
aarch64-linux kernel has configurable 39, 42 or 47 bit virtual address
space.  Most distros AFAIK use 42-bit VA right now, but there are also
39-bit VA users too.  The ppc64 handling can be used for this just fine
and support all the 3 sizes.

There are other issues, like allocator32 not really being able to support
the larger addres spaces, and hardcoded 39-bit address space size in other
macros.

Patch by Jakub Jelinek.

llvm-svn: 226639
2015-01-21 02:11:05 +00:00
Nico Weber 896984c251 Much spelling. Wow.
llvm-svn: 226638
2015-01-21 02:09:16 +00:00
Kostya Serebryany d4a032f6c6 [sanitizer] Fix aarch64 sanitizer build with recent glibc
glibc recently changed ABI on aarch64-linux:
https://sourceware.org/git/?p=glibc.git;a=commit;h=5c40c3bab2fddaca8cfe12d75944d1fef8adf1a4
Instead of having unsigned short mode; unsigned short __pad1; it now has
unsigned int mode; field in ipc_perm structure.

This patch allows to build against the recent glibc and disables the
ipc_perm.mode verification for older versions of glibc.

I think it shouldn't be a big deal even for older glibcs, I couldn't find
any place which would actually care about the exact mode field, rather than
the whole structure, appart from the CHECK_SIZE_AND_OFFSET macro.

Patch by Jakub Jelinek

llvm-svn: 226637
2015-01-21 02:08:42 +00:00
Kostya Serebryany c6338ac943 [asan] use MADV_NOHUGEPAGE for shadow to reduce the actual memory usage
llvm-svn: 226636
2015-01-21 02:05:31 +00:00
Petar Jovanovic 605c14807f [MIPS64] Make __clear_cache more optimal
Use synci implementation of clear_cache for short address ranges.
For long address ranges, make a kernel call.

Differential Revision: http://reviews.llvm.org/D6661

llvm-svn: 226567
2015-01-20 15:04:19 +00:00
Evgeniy Stepanov f074b3c2de [asan] Allow changing verbosity in activation flags.
This change removes some debug output in asan_flags.cc that
was reading the verbosity level before all the flags were parsed.

llvm-svn: 226566
2015-01-20 13:21:20 +00:00
Evgeniy Stepanov fbeb7e65d9 [asan] Warn if unsupported flags are used at activation.
llvm-svn: 226563
2015-01-20 12:19:14 +00:00
Viktor Kutuzov eae2e04923 [Msan] Fix the readlink unit test to pass on FreeBSD
Differential Revision: http://reviews.llvm.org/D7052

llvm-svn: 226554
2015-01-20 09:57:28 +00:00
Dmitry Vyukov cc5e40811b tsan: remove TSAN_SHADOW_COUNT
TSAN_SHADOW_COUNT is defined to 4 in all environments.
Other values of TSAN_SHADOW_COUNT were never tested and
were broken by recent changes to shadow mapping.
Remove it as there is no reason to fix nor maintain it.

llvm-svn: 226466
2015-01-19 15:01:07 +00:00
Viktor Kutuzov 9c967286e0 [Sanitizers] Intercept statvfs() on FreeBSD
Committed unreviewed with permission.

llvm-svn: 226462
2015-01-19 13:26:25 +00:00
Viktor Kutuzov 68f150f3d4 [Msan] Intercept stat() and fstatat() on FreeBSD
Differential Revision: http://reviews.llvm.org/D7051

llvm-svn: 226461
2015-01-19 13:22:33 +00:00
Evgeniy Stepanov a2edd9159a [sanitizer] Make unrecognized flags not fatal.
Print a warning at verbosity=1 and higher instead of dying immediately.

llvm-svn: 226458
2015-01-19 12:22:57 +00:00
Evgeniy Stepanov 6c6e589c1f [sanitizer] Switch flag parsing to LowLevelAlloc.
InternalAlloc is quite complex and its behavior may depend on the values of
flags. As such, it should not be used while parsing flags.

Sadly, LowLevelAlloc does not support deallocation of memory.

llvm-svn: 226453
2015-01-19 11:47:13 +00:00
Evgeniy Stepanov 3231dd3c1c [sanitizer] Simplify code in flag parser.
llvm-svn: 226452
2015-01-19 10:54:36 +00:00
Viktor Kutuzov abfacbdf3a [Sanitizers] Order initialization of coverage and guard arrays
Differential Revision: http://reviews.llvm.org/D6892

llvm-svn: 226440
2015-01-19 09:41:52 +00:00
Evgeniy Stepanov 141c5a9ae0 [sanitizer] Move options-related tests to sanitizer_common.
And handle help=1 in standalone LSan.

llvm-svn: 226438
2015-01-19 09:21:44 +00:00
Evgeniy Stepanov e5b1c0d98e [msan] Use internal__exit() instead of _exit().
llvm-svn: 226437
2015-01-19 09:20:28 +00:00
Evgeniy Stepanov 0540f4141f [dfsan] Use append_no_rtti_flag instead of manually specifying -fno-rtti.
llvm-svn: 226435
2015-01-19 08:26:38 +00:00
David Blaikie 4da5edbebe Update for tests failing due to improvements in clang's column information for aggregate expressions
llvm-svn: 226393
2015-01-18 02:17:55 +00:00
Hal Finkel 0e39c55d22 [sanitizer] Adjust max read size in FlagHandlerInclude
Setting the maximum read size in FlagHandlerInclude to 2^15 might be a good
default, but causes the read to fail on systems with a page size larger than
that (ReadFileToBuffer(...) will fail if the maximum allowed size is less than
the value returned by GetPageSizeCached()). For example, on my PPC64/Linux
system, GetPageSizeCached() returns 2^16. In case the page size is larger, use
that instead.

llvm-svn: 226368
2015-01-17 03:31:43 +00:00
Justin Bogner 66fd5c914a InstrProf: Optionally print an error when emitting profile data fails
Debugging a missing profile is a bit painful right now. We can make
people's lives a bit easier by adding a knob to enable printing a
helpful error message for such failures.

llvm-svn: 226312
2015-01-16 20:10:56 +00:00
Evgeniy Stepanov 5450a9635a [sanitizer] Additional error checking.
llvm-svn: 226279
2015-01-16 15:25:16 +00:00
Viktor Kutuzov 05f6929932 [Sanitizers] Intercept clock_gettime() on FreeBSD
Committed unreviewed with permission.

llvm-svn: 226276
2015-01-16 14:54:39 +00:00
Viktor Kutuzov 068ece9679 [Sanitizers] Intercept lgamma_r() on FreeBSD
Committed unreviewed with permission.

llvm-svn: 226275
2015-01-16 14:52:17 +00:00
Evgeniy Stepanov 4286a9bd5a [asan] Change detection of allow_user_segv_handler on Android.
llvm-svn: 226273
2015-01-16 13:12:22 +00:00
Evgeniy Stepanov 4448007885 [asan] More verbose output from one of the tests.
Trying to debug a buildbot-only failure.

llvm-svn: 226270
2015-01-16 12:08:32 +00:00
Evgeniy Stepanov 82d3ef1617 [asan] Fix asan_options-include test.
Wrong include order.

llvm-svn: 226268
2015-01-16 10:30:53 +00:00
Evgeniy Stepanov 29235e374c [sanitizer] Fix bashism in check_lint.sh.
llvm-svn: 226267
2015-01-16 10:20:49 +00:00
Evgeniy Stepanov e0009356ba [sanitizer] Cleanup linter temporary files.
llvm-svn: 226266
2015-01-16 10:09:56 +00:00
Evgeniy Stepanov db20539d3a [sanitizer] Fix compiler warning in the flag parser code.
llvm-svn: 226263
2015-01-16 09:32:31 +00:00
Hal Finkel e67f32aa99 [asan] Loosen test for upcoming ppc64 change
This test casts 0x4 to a function pointer and calls it. Unfortunately, the
faulting address may not exactly be 0x4 on PPC64 ELFv1 systems. The LLVM PPC
backend used to always generate the loads "in order", so we'd fault at 0x4
anyway. However, at upcoming change to loosen that ordering, and we'll pick a
different order on some targets. As a result, as explained in the comment, we
need to allow for certain nearby addresses as well.

llvm-svn: 226202
2015-01-15 20:48:38 +00:00
Evgeniy Stepanov 8c9a0708a0 [sanitizer] Restore -fno-lto accidentally removed in r226169.
llvm-svn: 226177
2015-01-15 16:31:22 +00:00
Evgeniy Stepanov bc14dd46f2 [sanitizer] Implement include= option.
Allows loading sanitizer options from file.

llvm-svn: 226175
2015-01-15 16:26:59 +00:00
Evgeniy Stepanov f294d5b829 [sanitizer] Flag parser rewrite.
The new parser is a lot stricter about syntax, reports unrecognized
flags, and will make it easier to implemented some of the planned features.

llvm-svn: 226169
2015-01-15 15:13:43 +00:00