Commit Graph

311 Commits

Author SHA1 Message Date
Naomi Musgrave 18203f763c Failing test highlighting no poisoning when destructor not declared.
Summary:
When destructor for a class is not declared, no destructor
is emitted, and members are not poisoned. Test case exhibits this
current bug in use-after-dtor implementation (detailed in
https://github.com/google/sanitizers/issues/596).

Reviewers: eugenis, kcc

Subscribers: llvm-commits

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

Rename test files.

llvm-svn: 247091
2015-09-08 22:41:50 +00:00
Naomi Musgrave 8eb36d2210 Test triangle inheritance member poisoning.
Summary: Verify that all members are poisoned.

Reviewers: eugenis, kcc

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

Test virtual functions and virtual bases poisoning proper size.

Runtime testing of destroying diamond inheritance.

Explicit testing for 0 optimizations.

Simplify test to only test interesting values.

Test poisoning on multiple inheritance with nontrivial and trivial members.

Removed unnecessary header.

Testing (anonymous/)bit fields.

Revised object instantiation in test to avoid undefined behavior.

llvm-svn: 246817
2015-09-03 23:06:13 +00:00
Evgeniy Stepanov 533fde9f4d [sanitizer] Move sem_* to common interceptors.
llvm-svn: 246184
2015-08-27 18:51:18 +00:00
Evgeniy Stepanov f8af87957c [msan] Regression test for PR24561.
Fixed in r245980.

llvm-svn: 245981
2015-08-25 22:20:15 +00:00
Daniel Jasper a2a463a787 Remove forkpty test with -Wl,-as-needed. This currently breaks in
various places. Let me know if you need more details about a
reproduction.

llvm-svn: 245417
2015-08-19 06:10:57 +00:00
Evgeniy Stepanov 35b0eaf23d [msan] Intercept openpty and forkpty.
llvm-svn: 245345
2015-08-18 20:36:48 +00:00
Naomi Musgrave 0e7ac9ab2b Removed xfail, since test is passing in line with expanded dtor sanitizing functionality
Summary: Fixed test in response to buildbot failures from last night.

Reviewers: eugenis, kcc

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

llvm-svn: 244952
2015-08-13 20:54:05 +00:00
Daniel Jasper 166d516603 Revert "Removed xfail, since test is passing in line with expanded dtor sanitizing functionality"
Still breaking the bot:
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/19678/steps/ninja%20check-msan/logs/stdio

llvm-svn: 244873
2015-08-13 07:57:32 +00:00
Naomi Musgrave 93520f09c8 Removed xfail, since test is passing in line with expanded dtor sanitizing functionality
Summary: Fixed test in response to buildbot failures from last night.

Reviewers: eugenis, kcc

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

llvm-svn: 244818
2015-08-12 21:31:27 +00:00
Daniel Jasper c2207c2791 Revert "Revised test to pass under updated dtor callback implementation"
This breaks the buildbot:
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/19656

llvm-svn: 244724
2015-08-12 08:13:39 +00:00
Naomi Musgrave e9971acc0c Revised test to pass under updated dtor callback implementation
Summary: New implementation for dtor sanitizer callback poisons only class members, and emits poisoning callback before base dtor invoked.

Reviewers: eugenis, kcc

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

Explicit dtor invocation

llvm-svn: 244709
2015-08-12 01:15:28 +00:00
Naomi Musgrave 8759aa3db1 test case for poisoning trivial members
Summary:
A virtual base class and derived class should only poison their
respective members upon destruction. In particular, trivial members should
be poisoned directly, non-trivial members should be poisoned by their
respective destructors, and references to non-trivial members should be
poisoned.

Reviewers: eugenis, kcc

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

Test case avoids casting to access members

Run configurations to reflect expected runtime failure on assertions.

Simplified access to internal members.

Updated internal member structure of base.

Revised assert in main to verify successful poisoning after dtor.

Verify address of pointer is poisoned.

Fixed assert err.

Cleaned up test by removing extraneous prints, asserts.

llvm-svn: 244521
2015-08-10 22:39:09 +00:00
Naomi Musgrave 2551b62931 Runtime check of poisoning derived class members.
Summary: Simple test case to verify that an instance of a derived class with virtual base is properly poisoned

Reviewers: eugenis, kcc

Subscribers: cfe-commits

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

modified test to be more concise, and check the local pointer to the destroyed object

revised test to not examine padding- only explicit object members

llvm-svn: 243913
2015-08-03 23:01:19 +00:00
Naomi Musgrave 64a1bd9db8 testing for tail call optimization repression when sanitizing use-after-dtor
Summary: Verify that running in optimized mode while checking for use-after-dtor errors, does not generate tail call invocation of destructor. This avoids possible error where stack frame for the destructor is eliminated, making tracking down the errors more difficult.

Reviewers: eugenis, kcc

Subscribers: cfe-commits

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

simplified test cases

updated line numbering on test

renamed test

llvm-svn: 243675
2015-07-30 18:46:18 +00:00
Kostya Serebryany c69bf1b4c0 [asan,tsan,msan] move the memcmp interceptor from asan/tsan to sanitizer_common. This may potentially lead to more reports from msan as it now sees the reads inside memcmp. To disable, use the flag intercept_memcmp=0. Likewise, it may potentially cause new races to appear due to more strict memcmp checking (flag strict_memcmp=1)
llvm-svn: 243595
2015-07-29 23:53:08 +00:00
Naomi Musgrave 41b3226637 added test file
llvm-svn: 242590
2015-07-17 23:28:02 +00:00
Alexey Samsonov 41bcf0bca2 [Sanitizer] Fix fopencookie() interceptor to work with null hook functions.
llvm-svn: 242193
2015-07-14 20:13:42 +00:00
Jay Foad b120712b29 Enable this test for PPC64.
llvm-svn: 241400
2015-07-05 08:11:36 +00:00
Jay Foad 8677baf024 Enable memory sanitizer for PPC64
Summary:
This patch adds basic memory sanitizer support for PPC64. PR23219.

I have further patches ready to enable it in LLVM and Clang, and to fix
most of the many failing tests in check-msan.

Reviewers: kcc, willschm, samsonov, wschmidt, eugenis

Reviewed By: eugenis

Subscribers: wschmidt, llvm-commits

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

llvm-svn: 240623
2015-06-25 06:22:31 +00:00
Jay Foad 2aec6216cb [msan] Mark one test as only supported on x86
Summary: This test uses x86 intrinsics, so it can't work on other platforms.

Reviewers: garious, eugenis, samsonov

Reviewed By: samsonov

Subscribers: llvm-commits

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

llvm-svn: 240449
2015-06-23 20:17:45 +00:00
Evgeniy Stepanov 9a10674079 [msan] Intercept fopencookie.
https://code.google.com/p/memory-sanitizer/issues/detail?id=86

llvm-svn: 240107
2015-06-19 01:28:41 +00:00
Evgeniy Stepanov d99717226d [msan] Fix mmap test on Fedora.
llvm-svn: 238226
2015-05-26 18:02:54 +00:00
Evgeniy Stepanov 45328240dc [msan] Mprotect all inaccessible memory regions.
Fix 2 bugs in memory mapping setup:
- the invalid region at offset 0 was not protected because mmap at
  address 0 fails with EPERM on most Linux systems. We did not
  notice this because the check condition was flipped: the code was
  checking that mprotect has failed. And the test that was supposed
  to catch this was weakened by the mitigations in the mmap
  interceptor.
- when running without origins, the origin shadow range was left
  unprotected.

The new test ensures that mmap w/o MAP_FIXED always returns valid
application addresses.

llvm-svn: 238109
2015-05-24 02:47:59 +00:00
Viktor Kutuzov 104a383e12 [Msan] Fix the if_indextoname.cc test to pass on FreeBSD
Differential Revision: http://reviews.llvm.org/D9456

llvm-svn: 236999
2015-05-11 14:46:16 +00:00
Viktor Kutuzov b0d28db6f1 [Msan] Fix the report-demangling.cc test to pass on FreeBSD
Differential Revision: http://reviews.llvm.org/D9554

llvm-svn: 236833
2015-05-08 12:10:46 +00:00
Viktor Kutuzov 7d5dfe1f34 [Msan] Make the obstack.cc test Linux-specific
Differential Revision: http://reviews.llvm.org/D9552

llvm-svn: 236831
2015-05-08 12:07:20 +00:00
Alexey Samsonov 8e5e8fb2f3 [SanitizerCoverage] Upgrade lit tests to new -fsanitize-coverage= flags.
llvm-svn: 236796
2015-05-07 23:20:47 +00:00
Viktor Kutuzov 28c99980e6 [Msan] Make the mallinfo.cc test Linux-specific
Differential Revision: http://reviews.llvm.org/D9461

llvm-svn: 236718
2015-05-07 12:06:35 +00:00
Viktor Kutuzov bea3ca2abf [Msan] Make the ioctl_sound.cc test Linux-specific
Differential Revision: http://reviews.llvm.org/D9460

llvm-svn: 236717
2015-05-07 12:03:07 +00:00
Viktor Kutuzov 179ceff160 [Msan] Fix the mmap_below_shadow.cc test to pass on FreeBSD
Differential Revision: http://reviews.llvm.org/D9462

llvm-svn: 236582
2015-05-06 09:31:33 +00:00
Viktor Kutuzov a26d2d4d5e [Msan] Fix the initgroups.cc test to build on FreeBSD
Differential Revision: http://reviews.llvm.org/D9458

llvm-svn: 236580
2015-05-06 09:26:35 +00:00
Viktor Kutuzov d04e0d7292 [Msan] Fix the ifaddrs.cc test to build and pass on FreeBSD
Differential Revision: http://reviews.llvm.org/D9457

llvm-svn: 236579
2015-05-06 09:24:02 +00:00
Viktor Kutuzov 86e0249235 [Msan] Fix the getline.cc test to pass on FreeBSD
Differential Revision: http://reviews.llvm.org/D9251

llvm-svn: 235975
2015-04-28 10:23:52 +00:00
Viktor Kutuzov 78206c5b7e [Msan] Fix the iconv.cc test to build and pass on FreeBSD
Differential Revision: http://reviews.llvm.org/D9252

llvm-svn: 235799
2015-04-25 11:07:05 +00:00
Viktor Kutuzov 53e047de9e [Msan] XFAIL the ftime.cc test on FreeBSD
Differential Revision: http://reviews.llvm.org/D9222

llvm-svn: 235704
2015-04-24 07:54:38 +00:00
Viktor Kutuzov 0e15144ba1 [Msan] Fix the backtrace.cc tests to build and pass on FreeBSD
Differential Revision: http://reviews.llvm.org/D9221

llvm-svn: 235703
2015-04-24 07:52:47 +00:00
Alexey Samsonov d06aa3dc00 [MSan] Remove explicit -m64 from RUN lines.
Target-specific flags should usually be configured by CMake/lit.

llvm-svn: 230999
2015-03-02 19:34:27 +00:00
Mohit K. Bhakkad b40fed04e7 [MSan][MIPS] Fix for some failing tests on MIPS64
Enabling internal ptrace for mips, which fixes some
ptrace related tests. Along with this fixing some
other failures.

Reviewers: Reviewers: eugenis, kcc, samsonov

Subscribers: dsanders, sagar, lldb-commits

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

llvm-svn: 229656
2015-02-18 09:24:19 +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
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
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 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 5823daf73d [msan] Put the coverage files for coverage-levels.cc into a temporary dir.
llvm-svn: 223355
2014-12-04 11:35:32 +00:00
Kostya Serebryany 29a2236c7d [msan] allow -fsanitize-coverage=N together with -fsanitize=memory, compiler-rt part
llvm-svn: 223314
2014-12-03 23:29:14 +00:00
Evgeniy Stepanov 8a988c40c8 [msan] Add one more test for the handling of stack origins.
llvm-svn: 223229
2014-12-03 13:26:56 +00:00
Evgeniy Stepanov a0b6899234 [msan] Fix origin propagation for select of floats.
MSan does not assign origin for instrumentation temps (i.e. the ones that do
not come from the application code), but "select" instrumentation erroneously
tried to use one of those.

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

llvm-svn: 222918
2014-11-28 11:17:58 +00:00
Evgeniy Stepanov 7555f5ed1f [msan] Remove MSanDR and supporting code.
MSanDR is a dynamic instrumentation tool that can instrument the code
(prebuilt libraries and such) that could not be instrumented at compile time.

This code is unused (to the best of our knowledge) and unmaintained, and
starting to bit-rot.

llvm-svn: 222232
2014-11-18 10:33:15 +00:00
Evgeniy Stepanov 35eb265421 [msan] Handle param-tls overflow.
ParamTLS (shadow for function arguments) is of limited size. This change
makes all arguments that do not fit unpoisoned, and avoids writing
past the end of a TLS buffer.

llvm-svn: 220351
2014-10-22 00:12:40 +00:00
Evgeniy Stepanov 3905bb9150 [asan] De-flake one test.
This change replaces an in-test timeout with an unconditional blocking wait.
It speeds up normal execution significantly at the cost of hanging up indefinitely
in case of a failure. This is a very specific regression test and we don't
expect any failures in the future.

Another approach ould be increasing the timeout to ~8 seconds, which seems too
much for a lit test.

llvm-svn: 217870
2014-09-16 12:03:52 +00:00
Evgeniy Stepanov 256d5512e6 [msan] Fix wrong array index in io_submit interceptor.
llvm-svn: 217362
2014-09-08 09:28:25 +00:00
Evgeniy Stepanov 36974a7061 [msan] Make chained_origin_limits test faster.
llvm-svn: 217361
2014-09-08 09:04:45 +00:00
Alexey Samsonov 62063b46fc Use "-gline-tables-only" instead of "-g" in sanitizer test suites.
We are interested in verifying that -gline-tables-only provides enough
debug information for verbose error reports and symbolized stack traces.

llvm-svn: 217284
2014-09-05 22:05:32 +00:00
Evgeniy Stepanov e9ca1c72be [msan] Fix fork test on centos-6.5.
Missing <atomic> header.

llvm-svn: 217142
2014-09-04 11:07:42 +00:00
Evgeniy Stepanov bb91e02efd [msan] Make origin tracking fork-safe.
Chained origins make plain memory stores async-signal-unsafe.
We already disable it inside signal handlers.
This change grabs all origin-related locks before fork() and releases
them after fork() to avoid a deadlock in the child process.

llvm-svn: 217140
2014-09-04 10:36:14 +00:00
Evgeniy Stepanov f1741f52ad [msan] Fix origin_history_per_stack_limit=0 behavior.
It disables the per-stack limit.

llvm-svn: 217030
2014-09-03 12:15:59 +00:00
Evgeniy Stepanov 5c72938c39 [msan] Use SIGHUP instead of SIGUSR1 in test.
Apparently, SIGUSR1 does not work on x86_64+ArchLinux for some reason.

For more details, see:
https://groups.google.com/forum/#!topic/llvm-dev/4Ag1FF4M2Dw

llvm-svn: 214289
2014-07-30 08:17:58 +00:00
Evgeniy Stepanov 465466e80c [msan] Stop demangling function name in the stack origin report.
This was done by calling __cxa_demangle directly, which is bad
when c++abi library is instrumented. The following line always
contains the demangled name (when running with a symbolizer) anyway.

llvm-svn: 212929
2014-07-14 09:35:27 +00:00
Evgeniy Stepanov 23e8dfd487 [msan] Make one test case less brittle.
llvm-svn: 212798
2014-07-11 08:47:51 +00:00
Alexey Samsonov 1ce0929465 [MSan] Make one more test standalone
llvm-svn: 212487
2014-07-07 20:59:10 +00:00
Alexey Samsonov efe7828c69 [MSan] Use a single file for dso-origin test
llvm-svn: 212484
2014-07-07 20:37:12 +00:00
Alexey Samsonov c1856835d1 [Sanitizer] Move test for malloc/free hooks under test/sanitizer_common
llvm-svn: 212474
2014-07-07 18:47:29 +00:00
Alexey Samsonov 91bb8e0e3a Generalize sanitizer allocator public interface.
Introduce new public header <sanitizer/allocator_interface.h> and a set
of functions __sanitizer_get_ownership(), __sanitizer_malloc_hook() etc.
that will eventually replace their tool-specific equivalents
(__asan_get_ownership(), __msan_get_ownership() etc.). Tool-specific
functions are now deprecated and implemented as stubs redirecting
to __sanitizer_ versions (which are implemented differently in each tool).

Replace all uses of __xsan_ versions with __sanitizer_ versions in unit
and lit tests.

llvm-svn: 212469
2014-07-07 17:39:31 +00:00
Evgeniy Stepanov 174242c74c [msan] Stop propagating shadow in blacklisted functions.
With this change all values passed through blacklisted functions
become fully initialized. Previous behavior was to initialize all
loads in blacklisted functions, but apply normal shadow propagation
logic for all other operation.

This makes blacklist applicable in a wider range of situations.

It also makes code for blacklisted functions a lot shorter, which
works as yet another workaround for PR17409.

llvm-svn: 212268
2014-07-03 11:56:30 +00:00
Evgeniy Stepanov e1a5a1f7a8 Revert of r212265.
llvm-svn: 212266
2014-07-03 11:35:08 +00:00
Evgeniy Stepanov cfc40ef98a [msan] Stop propagating shadow in blacklisted functions.
With this change all values passed through blacklisted functions
become fully initialized. Previous behavior was to initialize all
loads in blacklisted functions, but apply normal shadow propagation
logic for all other operation.

This makes blacklist applicable in a wider range of situations.

It also makes code for blacklisted functions a lot shorter, which
works as yet another workaround for PR17409.

llvm-svn: 212265
2014-07-03 11:18:48 +00:00
Evgeniy Stepanov 4e2d5edb0c [msan] Limit stack origin chain length.
Stack origins were created with unlimited length by mistake.

llvm-svn: 212036
2014-06-30 11:22:42 +00:00
Evgeniy Stepanov c935ca8c3c [msan] Add store_context_size= flag.
A new flag to control stack trace size for store event (in
track-origins=2 mode) independently of malloc_context_size.

llvm-svn: 211896
2014-06-27 12:48:01 +00:00
Evgeniy Stepanov 7d3c68a9cf [msan] Fix truncated stack trace in chained origin reports.
This is a leftover from the times when the next (chained) origin id
was stored as the last frame of a stack trace.

llvm-svn: 211878
2014-06-27 07:32:08 +00:00
Evgeniy Stepanov b163f0276f [msan] Fix bad interaction between with-calls mode and chained origin tracking.
Origin history should only be recorded for uninitialized values, because it is
meaningless otherwise. This change moves __msan_chain_origin to the runtime
library side and makes it conditional on the corresponding shadow value.

Previous code was correct, but _very_ inefficient.

llvm-svn: 211700
2014-06-25 14:41:57 +00:00
Evgeniy Stepanov 7ad0bde843 [msan] Fix false positive on dynamic tls.
Use existing DTLS code in sanitizer_tls_get_addr.{h,cc} to unpoison DTLS
blocks both on allocation and deallocation.

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

llvm-svn: 211683
2014-06-25 11:30:35 +00:00
Evgeniy Stepanov ad8065f01a [msan] Print stats even on successful run with atexit=1.
llvm-svn: 211574
2014-06-24 09:04:06 +00:00
Evgeniy Stepanov 2c27df9a33 [msan] Intercept __getdelim.
llvm-svn: 211162
2014-06-18 13:35:13 +00:00
Evgeniy Stepanov df187feae4 [msan] Fix handling of multiplication by a constant with a number of trailing zeroes.
Multiplication by an integer with a number of trailing zero bits leaves
the same number of lower bits of the result initialized to zero.
This change makes MSan take this into account in the case of multiplication by
a compile-time constant.

We don't handle the general, non-constant, case because
(a) it's not going to be cheap (computation-wise);
(b) multiplication by a partially uninitialized value in user code is
    a bad idea anyway.

Constant case must be handled because it appears from LLVM optimization of a
completely valid user code, as the test case in compiler-rt demonstrates.

llvm-svn: 211092
2014-06-17 09:23:12 +00:00
Evgeniy Stepanov 2be29929be Fix line numbers for code inlined from __nodebug__ functions.
Instructions from __nodebug__ functions don't have file:line
information even when inlined into no-nodebug functions. As a result,
intrinsics (SSE and other) from <*intrin.h> clang headers _never_
have file:line information.

With this change, an instruction without !dbg metadata gets one from
the call instruction when inlined.

Fixes PR19001.

llvm-svn: 210459
2014-06-09 09:09:19 +00:00
Evgeniy Stepanov ee98fb197b [msan] Fix wrong endianness when printing shadow.
llvm-svn: 210335
2014-06-06 14:06:14 +00:00
Evgeniy Stepanov bce21acf25 [msan] Implement MSAN_OPTIONS=print_stats=1.
llvm-svn: 209287
2014-05-21 09:56:28 +00:00
Evgeniy Stepanov 208aae8ee0 [msan] Chained origins re-design.
Generalize StackDepot and create a new specialized instance of it to
efficiently (i.e. without duplicating stack trace data) store the
origin history tree.

This reduces memory usage for chained origins roughly by an order of
magnitude.

Most importantly, this new design allows us to put two limits on
stored history data (exposed in MSAN_OPTIONS) that help avoid
exponential growth in used memory on certain workloads.

See comments in lib/msan/msan_origin.h for more details.

llvm-svn: 209284
2014-05-21 09:02:13 +00:00
Evgeniy Stepanov 5680a26b0b [msan] Better open_memstream support.
Move fflush and fclose interceptors to sanitizer_common.
Use a metadata map to keep information about the external locations
that must be updated when the file is written to.

llvm-svn: 208676
2014-05-13 08:36:31 +00:00
Alexey Samsonov 0bef819f9f [Sanitizer] Add the machinery to run the same test under several sanitizers
llvm-svn: 208378
2014-05-09 00:28:18 +00:00
Alexey Samsonov 35744c4753 Fixup for r208066. Properly get values of PTRACE_GETREGSET/PTRACE_SETREGSET.
llvm-svn: 208363
2014-05-08 22:11:20 +00:00
Evgeniy Stepanov c5e51926dc [msan] Intercept strxfrm.
llvm-svn: 208303
2014-05-08 12:04:01 +00:00
Evgeniy Stepanov 9c20cb1a7c [msan] Fix potential infinite recursion in a test.
If printf is intercepted (it is not atm), REAL(printf) call in the interceptor
would get redirected back to my_lgamma, resulting in infinite recursion.

llvm-svn: 208294
2014-05-08 09:37:36 +00:00
Evgeniy Stepanov 55590227f8 [sanitizer] Intercept obstack.
llvm-svn: 208196
2014-05-07 11:50:56 +00:00
Evgeniy Stepanov 8dd62dc3be [msan] Fix __msan_check_mem_is_initialized and prettify its output.
llvm-svn: 208195
2014-05-07 11:50:14 +00:00
Evgeniy Stepanov 06475bf752 [msan] Fix print_shadow test.
llvm-svn: 208069
2014-05-06 08:15:50 +00:00
Greg Fitzgerald b8aae5405b Add %run to all lit tests
llvm-svn: 207709
2014-04-30 21:34:17 +00:00
Evgeniy Stepanov fe250b0014 [msan] Prettify __msan_print_shadow.
Makes __msan_print_shadow output much more readable, adds origin info.

llvm-svn: 207622
2014-04-30 09:50:30 +00:00
Evgeniy Stepanov f3d5d119a8 [sanitizer] Intercept a bunch of stdio calls.
Add move fopen/freopen interceptors from TSan to common.

llvm-svn: 207224
2014-04-25 13:26:21 +00:00
Evgeniy Stepanov 5a7c364343 [msan] Disable chained origins in signal handlers.
StackDepot is not async-signal-safe; storing a new origin to it can deadlock.

llvm-svn: 206983
2014-04-23 14:01:57 +00:00
Evgeniy Stepanov a7f9071f25 [sanitizer] Intercept tsearch.
llvm-svn: 206755
2014-04-21 14:21:51 +00:00
Evgeniy Stepanov 24c8d92fec [sanitizer] Intercept a subset of sunrpc interface (xdr_*).
llvm-svn: 205627
2014-04-04 14:51:23 +00:00
Evgeniy Stepanov 6d8f71f928 Revert r205613.
llvm-svn: 205614
2014-04-04 08:58:16 +00:00
Evgeniy Stepanov fe82d5f849 [msan] Fix compilation of a disabled test.
llvm-svn: 205613
2014-04-04 08:39:50 +00:00
Evgeniy Stepanov 6cc687541f [msan] Add missing test for r205413.
llvm-svn: 205417
2014-04-02 12:38:13 +00:00
Evgeniy Stepanov 3c95744de8 [msan] Remove an extra top frame from track-origins=2 reports.
llvm-svn: 205192
2014-03-31 14:18:55 +00:00
Evgeniy Stepanov 92bee36b3e [sanitizer] Intercept rand_r.
llvm-svn: 205001
2014-03-28 11:21:45 +00:00
Evgeniy Stepanov 2e972f63b5 [sanitizer] Intercept mktime.
llvm-svn: 204994
2014-03-28 09:02:57 +00:00
Evgeniy Stepanov 7b44e1ad42 [sanitizer] Intercept ftime.
llvm-svn: 204991
2014-03-28 08:33:32 +00:00
Evgeniy Stepanov 89602651e8 [msan] Implement __msan_set_death_callback.
llvm-svn: 204926
2014-03-27 14:04:58 +00:00
Evgeniy Stepanov 9dcd5a353a [msan] Intercept several malloc-related functions.
llvm-svn: 204923
2014-03-27 13:29:29 +00:00
Sergey Matveev fa76f3b3a5 [MSan] Add __msan_unpoison_string() to the public interface.
Using __msan_unpoison() on null-terminated strings is awkward because
strlen() can't be called on a poisoned string. This case warrants a special
interface function.

llvm-svn: 204448
2014-03-21 10:12:17 +00:00
Evgeniy Stepanov d17b061eed [msan] Use new -fsanitize-memory-track-origins= flag in MSan tests.
llvm-svn: 204347
2014-03-20 15:00:39 +00:00
Evgeniy Stepanov a57750482f [msan] Fix line numbers in test.
This corresponds to a fix in llvm::SplitBlockAndInsertIfThen.

llvm-svn: 204229
2014-03-19 12:56:38 +00:00
Evgeniy Stepanov 412d973980 [msan] Origin tracking with history, compiler-rt part.
Compiler-rt part of MSan implementation of advanced origin tracking,
when we record not only creation point, but all locations where
an uninitialized value was stored to memory, too.

llvm-svn: 204152
2014-03-18 13:45:19 +00:00
Sergey Matveev 8bf42919e6 [msan] Make up for missing interceptor in getxattr() test.
llvm-svn: 202846
2014-03-04 13:13:34 +00:00
Sergey Matveev e7b3e4c2ae [msan] Add missing line to getxattr() test.
llvm-svn: 202841
2014-03-04 12:41:18 +00:00
Alexey Samsonov 5e6d83258e [CMake] lit tests shouldn't depend on runtimes in standalone build
llvm-svn: 201771
2014-02-20 09:47:18 +00:00
Alexey Samsonov 31043152d3 Add rudimentary support for running compiler-rt lit tests with GCC
llvm-svn: 201680
2014-02-19 15:13:14 +00:00
Alexey Samsonov cd8535a96d [CMake] Introduce COMPILER_RT_INCLUDE_TESTS option
llvm-svn: 201666
2014-02-19 11:18:47 +00:00
Alexey Samsonov 1c9b9bcb5c Simplify defining Clang compile flags in lit configs
llvm-svn: 201513
2014-02-17 13:08:10 +00:00
Alexey Samsonov 8434e60f7e Move MSan lit-tests under test/msan
llvm-svn: 201412
2014-02-14 13:02:58 +00:00