| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 251379
|
|
|
|
| |
llvm-svn: 251362
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes the ptrace interceptor for aarch64. The PTRACE_GETREGSET
ptrace syscall with with invalid memory might zero the iovec::iov_base
field and then masking the subsequent check after the syscall (since it
will be 0 and it will not trigger an invalid access). The fix is to copy
the value on a local variable and use its value on the checks.
The patch also adds more coverage on the Linux/ptrace.cc testcase by addding
check for PTRACE_GETREGSET for both general and floating registers (aarch64
definitions added only).
llvm-svn: 251331
|
|
|
|
|
|
|
|
| |
r248325.
Like i386, Mips needs a versioned interceptor but must select GLIBC_2.2.
llvm-svn: 249307
|
|
|
|
| |
llvm-svn: 249191
|
|
|
|
| |
llvm-svn: 248332
|
|
|
|
|
|
|
|
|
| |
This fixes a crash in pthread_create on linux/i386 due to abi
incompatibility between intercepted and non-intercepted functions.
See the test case for more details.
llvm-svn: 248325
|
|
|
|
| |
llvm-svn: 247737
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: filcab, rnk, kubabrecka
Subscribers: tberghammer, danalbert, srhines, llvm-commits
Differential Revision: http://reviews.llvm.org/D12305
llvm-svn: 245962
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch enables asan for aarch64/linux. It marks it as 'unstable-release',
since some tests are failing due either kernel missing support of non-executable
pages in mmap or environment instability (infinite loop in juno reference
boards).
It sets decorate_proc_maps test to require stable-release, since the test expects
the shadow memory to not be executable and the support for aarch64 is only
added recently by Linux (da141706aea52c1a9 - 4.0).
It also XFAIL static_tls test for aarch64 linker may omit the __tls_get_addr call
as a TLS optimization.
llvm-svn: 244054
|
|
|
|
|
|
|
| |
The test uses source file relative paths which does not work when the
test is executed on a remote device.
llvm-svn: 243564
|
|
|
|
|
|
|
|
|
|
| |
Rename getBinaryBasename() to getProcessName() and, on Linux,
read it from /proc/self/cmdline instead of /proc/self/exe. The former
can be modified by the process. The main motivation is Android, where
application processes re-write cmdline to a package name. This lets
us setup per-application ASAN_OPTIONS through include=/some/path/%b.
llvm-svn: 243473
|
|
|
|
|
|
| |
See http://reviews.llvm.org/D7203
llvm-svn: 243426
|
|
|
|
|
|
|
|
| |
This sets the default ASan flags to abort_on_error=1 on OS X. For unit tests and lit tests we set ASAN_OPTIONS back to abort_on_error=0 before running the tests (to avoid crashing). I added two tests that intentionally don't respect the default ASAN_OPTIONS to test the behavior of an empty ASAN_OPTIONS (on OS X we should crash, on Linux we should exit()).
Differential Revision: http://reviews.llvm.org/D7203
llvm-svn: 243418
|
|
|
|
|
|
|
|
|
|
| |
instead of abusing '__asan_init'
We currently version `__asan_init` and when the ABI version doesn't match, the linker gives a `undefined reference to '__asan_init_v5'` message. From this, it might not be obvious that it's actually a version mismatch error. This patch makes the error message much clearer by changing the name of the undefined symbol to be `__asan_version_mismatch_check_xxx` (followed by the version string). We obviously don't want the initializer to be named like that, so it's a separate symbol that is used only for the purpose of version checking.
Reviewed at http://reviews.llvm.org/D11004
llvm-svn: 243004
|
|
|
|
| |
llvm-svn: 242449
|
|
|
|
|
|
| |
'__interceptor_malloc' ; PR22681
llvm-svn: 241755
|
|
|
|
|
|
|
| |
read_binary_name_regtest.c requires seccomp kernel headers.
Make the test pass if <linux/seccomp.h> is missing.
llvm-svn: 241119
|
|
|
|
|
|
|
| |
The test simulates a sandbox that prevents the program from calling readlink().
ASan is supposed to still be able to print the executable name regardless of that.
llvm-svn: 241072
|
|
|
|
|
|
| |
PR23971 is fixed.
llvm-svn: 240975
|
|
|
|
|
|
| |
Different reasons for failing; see source file comments.
llvm-svn: 240858
|
|
|
|
|
|
| |
Due to bionic improvements and "recent" sized-delete changes in clang.
llvm-svn: 240856
|
|
|
|
|
|
|
| |
A workaround for PR23971.
Fixes the test on Android.
llvm-svn: 240855
|
|
|
|
|
|
| |
Hopefully the last partial revert. Sorry about the noise.
llvm-svn: 239785
|
|
|
|
| |
llvm-svn: 239771
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This commit adds symbolize_vs_style=false to every instance of
ASAN_OPTIONS in the asan tests and sets
ASAN_OPTIONS=symbolize_vs_style=false in lit, for tests which don't set
it.
This way we don't need to make the tests be able to deal with both
symbolize styles.
This is the first patch in the series. I will eventually submit for the
other sanitizers too.
We need this change (or another way to deal with the different outputs) in
order to be able to default to symbolize_vs_style=true on some platforms.
Adding to this change, I'm also adding "env " before any command line
which sets environment variables. That way the test works on other host
shells, like we have if the host is running Windows.
Reviewers: samsonov, kcc, rnk
Subscribers: tberghammer, llvm-commits
Differential Revision: http://reviews.llvm.org/D10294
llvm-svn: 239754
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D7098
llvm-svn: 238401
|
|
|
|
| |
llvm-svn: 237534
|
|
|
|
|
|
|
| |
Current code tries to find the dynamic TLS header to the left of the
TLS block without checking that it's not a static TLS allocation.
llvm-svn: 237495
|
|
|
|
|
|
| |
This should finally fix it.
llvm-svn: 237147
|
|
|
|
| |
llvm-svn: 237137
|
|
|
|
| |
llvm-svn: 237049
|
|
|
|
| |
llvm-svn: 236877
|
|
|
|
|
|
|
|
|
|
|
| |
This test was failing on mips because mips addresses are 40-bit long.
Using regex for address solves this issue.
Reviewers: dsanders, kcc, samsonov
Subscribers: llvm-commits, mohit.bhakkad, jaydeep
Differential Revision: http://reviews.llvm.org/D9516
llvm-svn: 236844
|
|
|
|
| |
llvm-svn: 236796
|
|
|
|
|
|
| |
Contrary to my hopes, it didn't magically work on other platforms.
llvm-svn: 236645
|
|
|
|
|
|
|
|
| |
Example usage:
sancov.py print a.out.1234.sancov | sancov.py missing a.out
llvm-svn: 236637
|
|
|
|
|
|
|
|
|
| |
This CL:
- moves PrepareForSandboxing() to sanitizer_posix_libcdep.cc
- fixes the coverage tests to use flag substitutions defined in r233802 and not rely on hardcoded shared library names
- moves those tests to TestCases/Posix so that they can be executed on Darwin
llvm-svn: 233828
|
|
|
|
|
|
|
|
|
| |
platform-specific substitutions for rpath linker flags
Also make suppressions-library.cc use the same flags to avoid warnings about unused -rpath flags.
The same substitutions will be used to make coverage tests work on both Linux and Darwin without duplicating the code.
llvm-svn: 233802
|
|
|
|
| |
llvm-svn: 233040
|
|
|
|
|
|
|
|
| |
OpenFile.
This is to fix mapping coverage files into memory on OSX.
llvm-svn: 232936
|
|
|
|
|
|
| |
r232788.
llvm-svn: 232845
|
|
|
|
| |
llvm-svn: 232808
|
|
|
|
| |
llvm-svn: 232763
|
|
|
|
|
|
| |
dumped in the order of their appearance
llvm-svn: 232573
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The experiments can be used to evaluate potential optimizations that remove
instrumentation (assess false negatives). Instead of completely removing
some instrumentation, you set Exp to a non-zero value (mask of optimization
experiments that want to remove instrumentation of this instruction).
If Exp is non-zero, this pass will emit special calls into runtime
(e.g. __asan_report_exp_load1 instead of __asan_report_load1). These calls
make runtime terminate the program in a special way (with a different
exit status). Then you run the new compiler on a buggy corpus, collect
the special terminations (ideally, you don't see them at all -- no false
negatives) and make the decision on the optimization.
The exact reaction to experiments in runtime is not implemented in this patch.
It will be defined and implemented in a subsequent patch.
http://reviews.llvm.org/D8198
llvm-svn: 232501
|
|
|
|
|
|
|
|
| |
Power is 64-bit but does not support leak detection,
so this test fails. Use the more robust leak-detection
predicate instead.
llvm-svn: 231782
|
|
|
|
|
|
| |
-sanitizer-coverage-block-threshold=0 to actually do something useful.
llvm-svn: 231736
|
|
|
|
|
|
|
|
|
|
|
| |
1. /proc/self/smaps may be bigger than 1 << 14. On my machine, it is
26KB.
2. The read system call may return a partially filled buffer. We need
to check the return value from read.
Patch by H.J. Lu
llvm-svn: 231502
|
|
|
|
|
|
| |
hopefully making it more robust. Also increase the allowed coverage size on 32-bit.
llvm-svn: 231413
|