Commit Graph

39 Commits

Author SHA1 Message Date
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 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
Kostya Serebryany 8cc4002df2 [asan] make a test consume 2x less RAM (we observe flaky bot failures that seem like OOMs)
llvm-svn: 225478
2015-01-08 23:37:09 +00:00
Kostya Serebryany 7e85a9216e [asan] add a flag soft_rss_limit_mb
llvm-svn: 225323
2015-01-06 23:53:32 +00:00
Kostya Serebryany 43eb7735f2 [asan] new flag: hard_rss_limit_mb
llvm-svn: 224353
2014-12-16 19:13:01 +00:00
Kostya Serebryany 42102b110e [asan] introduce __sanitizer_set_death_callback, deprecate __asan_set_death_callback
llvm-svn: 224286
2014-12-15 23:02:57 +00:00
Alexey Samsonov fbaaed6b58 [Sanitizer] Introduce "stack_trace_format" runtime flag.
This flag can be used to specify the format of stack frames - user
can now provide a string with placeholders, which should be printed
for each stack frame with placeholders replaced with actual data.
For example "%p" will be replaced by PC, "%s" will be replaced by
the source file name etc.

"DEFAULT" value enforces default stack trace format currently used in
all the sanitizers except TSan.

This change also implements __sanitizer_print_stack_trace interface
function in TSan.

llvm-svn: 221469
2014-11-06 18:43:45 +00:00
Renato Golin 883abab1e8 Disable XFAIL on ARM since the x86_64 specific code is isolated
llvm-svn: 221347
2014-11-05 14:44:58 +00:00
Jay Foad 70a3841a8f Get the Linux ptrace test working on PowerPC64
The test refers to user_regs_struct.rip so it can only ever have worked
on x86-64. Put this code inside an appropriate #if, and add a similar
case for PowerPC64. (If we do likewise for ARM we can probably remove
the XFAILs, but I have no way of testing that.)

Those changes are enough to get the test working for me on big-endian
PowerPC64 Fedora 19.

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

llvm-svn: 221337
2014-11-05 08:42:48 +00:00
Alexey Samsonov 3ca50c34ec Add runtime flag 'symbolize_inline_frames' to disable symbolization of inlined frames done in llvm-symbolizer
llvm-svn: 220582
2014-10-24 18:34:43 +00:00
Renato Golin 1aaa4bcdd1 Mark sanitizer tests XFAIL on ARMv7
ASAN, UBSAN and profile tests that don't work with arm-linux-gnueabi and
android also don't work on armv7l-linux-gnueabihf. Some of the tests have
known causes, others not yet. In order to get a green bot, I'm disabling
those tests for now and will investigate when the priority rises.

llvm-svn: 219343
2014-10-08 21:13:23 +00:00
Lorenzo Martignoni 60ebffc12f Custom wrappers for DFSanitizing sprintf & snprintf.
Differential Revision: http://reviews.llvm.org/D5561

llvm-svn: 219293
2014-10-08 10:01:42 +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
Sergey Matveev 08347ca4fd [lsan] Implement the public allocator interface in standalone LSan.
llvm-svn: 216459
2014-08-26 14:28:28 +00:00
Sergey Matveev 93a2906e80 [lsan] Implement __sanitizer_print_stack_trace() in standalone LSan.
llvm-svn: 216454
2014-08-26 12:52:41 +00:00
Kostya Serebryany 74bd6bc9f9 [sanitizer] move mlock interceptor from asan/tsan/msan to common; no functionality change intended
llvm-svn: 216407
2014-08-25 20:57:59 +00:00
Alexey Samsonov 00c02b297a Add regression test for PR15823
llvm-svn: 215941
2014-08-18 22:11:14 +00:00
Alexey Samsonov cd21e2f7e4 [TSan] Initialize flags as early as possible. Disables back coredump, accidentally enabled in r215479. Add a test.
llvm-svn: 215763
2014-08-15 19:53:51 +00:00
Evgeniy Stepanov f5c1f8ac84 [sanitizer] Intercept timerfd_settime, timerfd_gettime.
llvm-svn: 215112
2014-08-07 14:21:42 +00:00
Evgeniy Stepanov bce3cf8074 [sanitizer] De-flake one test.
llvm-svn: 213054
2014-07-15 08:46:51 +00:00
Evgeniy Stepanov d73e7cc879 [sanitizer] Intercept getpass.
llvm-svn: 212937
2014-07-14 13:07:51 +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
Kostya Serebryany 7c163a44aa [sanitizer] support c11 aligned_alloc, Linux only for now
llvm-svn: 212322
2014-07-04 07:30:34 +00:00
Greg Fitzgerald 7c8bfd804b Remove ARM XFAIL from passing test
llvm-svn: 211608
2014-06-24 16:58:59 +00:00
Evgeniy Stepanov a2327c3a65 [sanitizer] Intercept pthread_*attr_get*.
This is a resubmit of r211166 reverted due to osx breakage.

llvm-svn: 211264
2014-06-19 10:19:57 +00:00
Arnold Schwaighofer 868050a667 Revert "[sanitizer] Intercept pthread_*attr_get*."
This reverts commit r211166. It broke public mac os x bots.

llvm-svn: 211206
2014-06-18 19:04:47 +00:00
Evgeniy Stepanov b87f1efc5f [sanitizer] Intercept pthread_*attr_get*.
llvm-svn: 211166
2014-06-18 14:16:41 +00:00
Greg Fitzgerald e124a30fbe Un-xfail passing ARM Android tests
llvm-svn: 210360
2014-06-06 18:06:58 +00:00
Sergey Matveev a531058d2b [MSan] Implement __sanitizer_print_stack_trace().
llvm-svn: 209625
2014-05-26 13:08:08 +00:00
Greg Fitzgerald 1733b5e263 XFAIL ptrace test on arm
The patch adds better target_triple and target_arch defaults for lit tests,
which allows us to XFAIL tests based on architecture.

Was:
  target_triple = LLVM_DEFAULT_TARGET_TRIPLE
  target_arch = HOST_ARCH

Now:
  target_triple = COMPILER_RT_TEST_TARGET_TRIPLE
                , otherwise LLVM_DEFAULT_TARGET_TRIPLE
  target_arch = first item in COMPILER_RT_TEST_TARGET_TRIPLE

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

llvm-svn: 209256
2014-05-20 23:31:26 +00:00
Greg Fitzgerald 40a6401b1f Run common and profile tests in cross-compiled builds.
Route target_cflags to common and profile tests

llvm-svn: 209248
2014-05-20 22:04:27 +00:00
Evgeniy Stepanov 99d3791a88 [sanitizer] Fix crash in getgrnam_r and similar interceptors.
When no matching record is found, getgrnam_r return 0 but sets result to NULL.
Should fix PR19734.

llvm-svn: 208773
2014-05-14 12:32:40 +00:00
Evgeniy Stepanov adc3ff9f48 [sanitizer] Move open_memstream test under Linux.
llvm-svn: 208755
2014-05-14 07:27:18 +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 79b8fb5d2c Mark ptrace test as Linux-specific
llvm-svn: 208643
2014-05-13 00:02:18 +00:00
Alexey Samsonov b51d6081f3 Restrict the set of sanitizers that should run tests from test/sanitizer_common
llvm-svn: 208639
2014-05-12 22:48:29 +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 6dd8dfb1c4 [Sanitizer] Move lit config for sanitizer_common unit tests under Unit/ dir for consistency.
llvm-svn: 208373
2014-05-08 23:53:02 +00:00
Alexey Samsonov 35a66d15d4 Move config for sanitizer_common tests under test/ for consistency
llvm-svn: 201779
2014-02-20 12:18:08 +00:00