Age | Commit message (Collapse) | Author |
|
When the file is initialized, this patch checks whether the path
specifies a directory. If so, it creates the directory tree before
truncating the file.
Use default.profdata instead of pgo-data for default indexed profile name.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@241824 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
'__interceptor_malloc' ; PR22681
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@241755 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Specifically:
- Start using %expect_crash.
- Provide an implementation of __ubsan::getDynamicTypeInfoFromVtable
for the Microsoft C++ ABI. This is all that is needed for CFI
diagnostics; UBSan's -fsanitize=vptr also requires an implementation of
__ubsan::checkDynamicType.
- Build the sanitizer runtimes against the release version of the C
runtime, even in debug builds.
- Accommodate demangling differences in tests.
Differential Revision: http://reviews.llvm.org/D11029
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@241745 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Since http://reviews.llvm.org/D10294, ASan test cases now respect default env. options via `ASAN_OPTION=$ASAN_OPTIONS:additional_options=xxx`. This patch adds this to a few test cases where it's still missing.
Differential Revision: http://reviews.llvm.org/D10988
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@241571 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
On OS X 10.11 (which is currently a public beta), the dynamic linker has been improved so that it doesn't require the use of DYLD_INSERT_LIBRARIES in order for interposition/wrappers to work. This patch adds support of this behavior into ASan – we no longer need to re-exec in case the env. variable is not set.
Reviewed at http://reviews.llvm.org/D10924
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@241487 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
On OS X, when the main instrumented binary contains a custom section with zero length, ASan will crash (assert failure) early in the initialization.
Reviewed at http://reviews.llvm.org/D10944
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@241474 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@241400 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Specifically:
- Disable int128 tests on Windows, as MSVC cl.exe does not support
int128, so we might not have been able to build the runtime
with int128 support.
- XFAIL the vptr tests as we lack Microsoft ABI support.
- XFAIL enum.cpp as UBSan fails to add the correct instrumentation code
for some reason.
- Modify certain tests that build executables multiple times to use
unique names for each executable. This works around a race condition
observed on Windows.
- Implement IsAccessibleMemoryRange for Windows to fix the last
misaligned.cpp test.
- Introduce a substitution for testing crashes on Windows using
KillTheDoctor.
Differential Revision: http://reviews.llvm.org/D10864
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@241303 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
read_binary_name_regtest.c requires seccomp kernel headers.
Make the test pass if <linux/seccomp.h> is missing.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@241119 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
POSIX states that "It shall be safe to destroy an initialized condition
variable upon which no threads are currently blocked", and later clarifies
"A condition variable can be destroyed immediately after all the threads
that are blocked on it are awakened) (in examples section). Tsan reported
such destruction as a data race.
Fixes https://llvm.org/bugs/show_bug.cgi?id=23616
Reviewed in http://reviews.llvm.org/D10693
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@241082 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
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.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@241072 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
PR23971 is fixed.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@240975 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
struct sigaction was not initialized. As the result if SA_RESETHAND is set in sa_flags, then the handler is reset after first invocation leading to crash.
Initialize struct sigaction to zero.
Reviewed in http://reviews.llvm.org/D10803
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@240965 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
The new suppression type is called "race_top" and is matched only against top frame in report stacks.
This is required for situations when we want to suppress a race in a "thread pool" or "event loop" implementation.
If we simply use "race:ThreadPool::Execute" suppression, that can suppress everything in the program.
Reviewed in http://reviews.llvm.org/D10686
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@240949 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
See the comment for explanation.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@240943 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Different reasons for failing; see source file comments.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@240858 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This helps Android (which only support PIE) and does not hurt anything else.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@240857 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Due to bionic improvements and "recent" sized-delete changes in clang.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@240856 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
A workaround for PR23971.
Fixes the test on Android.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@240855 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
We were unsetting DYLD_ROOT_PATH before calling atos on Darwin in order to
address it not working for symbolicating 32 bit binaries. (atos essentiall
tries to respawn as a 32 bit binary and it's disallowed to respawn if
DYLD_ROOT_PATH is set ... ) However, processes rely on having DYLD_ROOT_PATH
set under certain conditions, so this is not the right fix. In particular, this
always crashes when running ASanified process under the debugger in Xcode with
iOS simulator, which is a very important workflow for us to support.
This patch reverts the unsetting of the DYLD_ROOT_PATH. The correct fix to the
misbehavior on 32-bit binaries should happen inside atos.
http://reviews.llvm.org/D10722
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@240724 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Previously tsan modelled dup2(oldfd, newfd) as write on newfd.
We hit several cases where the write lead to false positives:
1. Some software dups a closed pipe in place of a socket before closing
the socket (to prevent races actually).
2. Some daemons dup /dev/null in place of stdin/stdout.
On the other hand we have not seen cases when write here catches real bugs.
So model dup2 as read on newfd instead.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@240687 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
are available.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@240671 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Random failures on the bots.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@240668 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
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
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@240623 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
This patch implements step 1 from
https://llvm.org/bugs/show_bug.cgi?id=23539#c10
I'd appreciate if you could test it on Mac OS and verify that parts of UBSan
runtime that reference C++ ABI symbols are properly excluded, and fix ASan/UBSan
builds.
Test Plan: regression test suite
Reviewers: thakis, hans
Subscribers: llvm-commits, zaks.anna, kubabrecka
Differential Revision: http://reviews.llvm.org/D10621
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@240617 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
We see false reports between dlopen and dl_iterate_phdr.
This happens because tsan does not see dynamic linker
internal synchronization. Unpoison module names
in dl_iterate_phdr callback.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@240576 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
They are meaningless.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@240539 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This happens only in corner cases, but we observed this on a real app.
See the test for description of the exact scenario that lead to unbounded memory consumption.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@240535 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
This patch fixes incorrect truncation when the input wider value is
exactly 2^dstBits. For that value, the overflow to infinity is not
correctly handled. The fix is to replace a strict '>' with '>='.
Currently,
__truncdfsf2(340282366900000000000000000000000000000.0) returns infinity
__truncdfsf2(340282366920938463463374607431768211456.0) returns 0
__truncdfsf2(400000000000000000000000000000000000000.0) returns infinity
Likewise, __truncdfhf2 and __truncsfhf2 (and consequently gnu_f2h_ieee)
are discontinuous at 65536.0.
This patch adds tests for all three cases, along with adding a missing
header include to fp_test.h.
Reviewers: joerg, ab, srhines
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10594
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@240450 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
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
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@240449 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@240168 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Also includes execution tests for the feature.
Differential Revision: http://reviews.llvm.org/D10269
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@240111 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Re-land fixed version of r239955.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@240108 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
https://code.google.com/p/memory-sanitizer/issues/detail?id=86
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@240107 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This change makes cmake fail to even run on Darwin with errors
evaluating "$<TARGET_OBJECTS:RTInterception.x86_64>".
This reverts r239955
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@239985 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@239955 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@239841 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Hopefully the last partial revert. Sorry about the noise.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@239785 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@239773 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@239771 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This reverts commit r239764 and the TestCases/Windows part of r239754.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@239768 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@239764 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
compiler-rt runtime support library
This patch adds runtime support for the Safe Stack protection to compiler-rt
(see http://reviews.llvm.org/D6094 for the detailed description of the
Safe Stack).
This patch is our implementation of the safe stack on top of compiler-rt. The
patch adds basic runtime support for the safe stack to compiler-rt that
manages unsafe stack allocation/deallocation for each thread.
Original patch by Volodymyr Kuznetsov and others at the Dependable Systems
Lab at EPFL; updates and upstreaming by myself.
Differential Revision: http://reviews.llvm.org/D6096
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@239763 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
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
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@239754 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Like we do for the various __*tf* tests, check that long double is the
128bit type we expect directly in the header. The latter is now used by
unrelated tests (__*hf* since r237161), and those tests will break for
no reason if uint128_t doesn't exist, and long double isn't fp128.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@239630 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Patch by Maria Guseva.
Differential Revision: http://reviews.llvm.org/D10336
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@239461 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This should restore the darwin buildbot.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@239364 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
simplify analysis of sanitized systems logs.
Differential Revision: http://reviews.llvm.org/D7333
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@239134 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@239063 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
This way, if they're set when running ninja check-ubsan (or another
sanitizer), they get cleared before we start invoking the programs.
Reviewers: samsonov, kcc
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10229
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@238991 91177308-0d34-0410-b5e6-96231b3b80d8
|