| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is required to properly re-apply r245770:
1) We should be able to dump coverage in __sanitizer::Die() if coverage
collection is turned on.
2) We don't want to explicitly do this in every single
sanitizer that supports it.
3) We don't want to link in coverage (and therefore symbolization) bits
into small sanitizers that don't support it (safestack).
The solution is to make InitializeCoverage() register its own Die()
callback that would call __sanitizer_cov_dump(). This callback should be
executed in addition to another tool-specific die callbacks (if there
are any).
llvm-svn: 245889
|
|
|
|
|
|
|
|
|
| |
This patch adds support for dfsan on aarch64-linux with 42-bit VMA
(current default config for 64K pagesize kernels). The support is
enabled by defining the SANITIZER_AARCH64_VMA to 42 at build time
for both clang/llvm and compiler-rt. The default VMA is 39 bits.
llvm-svn: 245841
|
|
|
|
|
|
| |
It's not used now, as is not even included in "dfsan" target.
llvm-svn: 245766
|
|
|
|
| |
llvm-svn: 245362
|
|
|
|
| |
llvm-svn: 244083
|
|
|
|
| |
llvm-svn: 244082
|
|
|
|
|
|
| |
sanitizer coverage. Also fix pedantic warnings
llvm-svn: 243721
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch enable DFSan for AArch64 (39-bit VMA). All tests are passing
but:
* test/dfsan/custom.cc
Due an invalid access in dl_iterate_phdr instrumentation (commenting out
this function make the testcase to pass). The test is XFAIL for aarch64
for now.
llvm-svn: 243688
|
|
|
|
|
|
| |
sanitizers. Hide the declaration and the calls in better macros
llvm-svn: 243610
|
|
|
|
| |
llvm-svn: 243362
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, Android target had a logic of duplicating all sanitizer
output to logcat. This change extends it to all posix platforms via
the use of syslog, controlled by log_to_syslog flag. Enabled by
default on Android, off everywhere else.
A bit of cmake magic is required to allow Printf() to call a libc
function. I'm adding a stub implementation to support no-libc builds
like dfsan and safestack.
This is a second attempt. I believe I've fixed all the issues that
prompted the revert: Mac build, and all kinds of non-CMake builds
(there are 3 of those).
llvm-svn: 243051
|
|
|
|
|
|
| |
Breaks Mac build.
llvm-svn: 242978
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, Android target had a logic of duplicating all sanitizer
output to logcat. This change extends it to all posix platforms via
the use of syslog, controlled by log_to_syslog flag. Enabled by
default on Android, off everywhere else.
A bit of cmake magic is required to allow Printf() to call a libc
function. I'm adding a stub implementation to support no-libc builds
like dfsan and safestack.
llvm-svn: 242975
|
|
|
|
| |
llvm-svn: 238085
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Add a weak hook to be called from dfsan's custom memcmp.
The primary user will be lib/Fuzzer.
If this works well we'll add more hooks (strcmp, etc).
Test Plan: Will be covered by lib/Fuzzer tests.
Reviewers: pcc
Reviewed By: pcc
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D9541
llvm-svn: 236679
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Add api_list entries for the dfsan-based fuzzer
Test Plan: covered by check-fuzzer
Reviewers: pcc
Reviewed By: pcc
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D9538
llvm-svn: 236657
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
When running the compiler-rt testsuite on FreeBSD (it didn't matter which version), I always got the same error result:
FAILED: cd /home/dim/obj/llvm-234092-trunk-freebsd10-amd64-ninja-rel-1/projects/compiler-rt/lib && LLVM_CHECKOUT=/home/dim/src/llvm/trunk SILENT=1 TMPDIR= PYTHON_EXECUTABLE=/usr/local/bin/python2.7 COMPILER_RT=/home/dim/src/llvm/trunk/projects/compiler-rt /home/dim/src/llvm/trunk/projects/compiler-rt/lib/sanitizer_common/scripts/check_lint.sh
The following differences between the implemented custom wrappers and the tests have been found:
--- /tmp/tmp.vPFEefvclf 2015-04-04 17:11:44.996734563 +0200
+++ /tmp/tmp.NbIuvjxKEe 2015-04-04 17:11:45.044734647 +0200
@@ -1,52 +0,0 @@
-calloc
-clock_gettime
-ctime_r
-dfsan_set_write_callback
-dl_iterate_phdr
-dlopen
-fgets
-fstat
-get_current_dir_name
-getcwd
-gethostname
-getpwuid_r
-getrlimit
-getrusage
-gettimeofday
-inet_pton
-localtime_r
-memchr
-memcmp
-memcpy
-memset
-nanosleep
-poll
-pread
-pthread_create
-read
-sched_getaffinity
-select
-sigaction
-sigemptyset
-snprintf
-socketpair
-sprintf
-stat
-strcasecmp
-strchr
-strcmp
-strcpy
-strdup
-strlen
-strncasecmp
-strncmp
-strncpy
-strrchr
-strstr
-strtod
-strtol
-strtoll
-strtoul
-strtoull
-time
-write
After some investigation, it turns out to be due to the regex used for search test_ symbols in lib/dfsan/scripts/check_customer_wrappers.sh:
grep -E "^\\s*test_.*\(\);" ${DFSAN_CUSTOM_TESTS}
This uses \s to search for whitespace at start of line, but support for \s was only introduced in GNU grep v2.5.4-112-gf979ca0, while both FreeBSD and OSX only have grep 2.5.1 (the last version released under GPLv2).
I propose to change \s into [[:space:]], which is the more portable notation.
Test Plan: Run regression tests, and see that they work now. :)
Reviewers: pcc, samsonov, emaste
Reviewed By: emaste
Subscribers: llvm-commits, emaste
Differential Revision: http://reviews.llvm.org/D8832
llvm-svn: 234704
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D8966
llvm-svn: 234633
|
|
|
|
|
|
|
| |
On Windows, we have to know if a memory to be protected is mapped or not.
On POSIX, Mprotect was semantically different from mprotect most people know.
llvm-svn: 234602
|
|
|
|
|
|
| |
Should unbreak fuzzer buildbot.
llvm-svn: 234542
|
|
|
|
| |
llvm-svn: 234487
|
|
|
|
| |
llvm-svn: 234481
|
|
|
|
| |
llvm-svn: 234477
|
|
|
|
|
|
| |
This is a follow-up for r232936.
llvm-svn: 232937
|
|
|
|
|
|
|
| |
This is a re-application of r229554 restricted to Linux build only.
Apple still uses Makefile/autoconf to build Clang and sanitizers.
llvm-svn: 229756
|
|
|
|
|
|
|
|
|
| |
This reverts commit r229556.
Reverting this for now as internal apple builds rely on this
functionality.
llvm-svn: 229585
|
|
|
|
|
|
|
|
| |
They autotools build has a number of missing features, supports less
OS, architectures, build configurations, doesn't have any tests and
is hard to support in sync with CMake build.
llvm-svn: 229556
|
|
|
|
|
|
|
| |
These functions are always used to initialize singleton flags(), as
well as other global data (common_flags()).
llvm-svn: 228894
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D7233
llvm-svn: 227570
|
|
|
|
| |
llvm-svn: 226435
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 225692
|
|
|
|
|
|
|
|
|
|
|
| |
This mirrors r225239 to all the rest sanitizers:
ASan, DFSan, LSan, MSan, TSan, UBSan.
Now the runtime flag type, name, default value and
description is located in the single place in the
.inc file.
llvm-svn: 225327
|
|
|
|
|
|
|
|
|
|
| |
Minor changes to enable DFSAN on MIPS64
Patch by Kumar Sukhani!
Differential Revision: http://reviews.llvm.org/D6437
llvm-svn: 223517
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D6306
llvm-svn: 222425
|
|
|
|
| |
llvm-svn: 221936
|
|
|
|
|
|
| |
uninstrumented vararg functions.
llvm-svn: 221364
|
|
|
|
| |
llvm-svn: 221363
|
|
|
|
|
|
| |
This incorporates some of the newer functions used by (e.g.) the Go runtime.
llvm-svn: 221362
|
|
|
|
|
|
| |
ABI list.
llvm-svn: 221361
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D6029
llvm-svn: 220907
|
|
|
|
|
|
|
|
|
|
| |
let's rename it to append_list_if
Doing s/append_if/append_list_if/, no functional change.
http://reviews.llvm.org/D5739
llvm-svn: 219860
|
|
|
|
|
|
|
|
|
| |
On a default FreeBSD install Bash is not installed and fdescfs is not
mounted. Use plain sh functionality instead.
Differential Revision: http://reviews.llvm.org/D5631
llvm-svn: 219333
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D5561
llvm-svn: 219293
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the write would not change the value in memory.
When writing a label to shadow memory, don't write if the value is already set to the value being written. This dramatically reduces real memory consumption in programs with sparse use of labels.
Test Plan: It would be nice to test that unnecessary writes are skipped, but I do not see how a unit test could do this.
Patch by Sam Kerner!
Differential Revision: http://reviews.llvm.org/D4894
llvm-svn: 215961
|
|
|
|
| |
llvm-svn: 213997
|
|
|
|
|
|
|
|
|
|
| |
across sanitizers.
Get rid of ASAN_USE_PREINIT_ARRAY and LSAN_USE_PREINIT_ARRAY - just always
use .preinit_array if it's available. This mode seems stable enough, and
we've been relying on default values of these macro for a long time.
llvm-svn: 213980
|
|
|
|
| |
llvm-svn: 210202
|
|
|
|
|
|
|
|
| |
DEPENDS rather than SOURCES. The SOURCES just end up looking on the
filesystem and not finding anything. Makes for very hard to debug build
errors. =/
llvm-svn: 207722
|
|
|
|
|
|
|
|
|
|
|
| |
Add dfsan_set_write_callback(), which sets a callback to be invoked when
a write() call is invoked within DFSan instrumented code.
Patch by Sam Kerner!
Differential Revision: http://reviews.llvm.org/D3268
llvm-svn: 207131
|