Age | Commit message (Collapse) | Author |
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@332037 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
inline sanitizer coverage anyway
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@332036 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
NetBSD can use the approach that exists in FreeBSD, Linux and SunOS.
Pick the FreeBSD one as marking programs with "-z origin" is useful.
Sponsored by <The NetBSD Foundation>
Reviewers: joerg, vitalybuka, kcc
Reviewed By: vitalybuka
Subscribers: emaste, fedor.sergeev, llvm-commits, #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D46718
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@332035 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
instrumentation. This mode has not been used and our experiments with https://github.com/google/fuzzer-test-suite show that this signal is weaker than the SanitizerCoverage
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@332034 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
Experimental data flow tracer for fuzz targets.
Allows to tell which bytes of the input affect which functions of the fuzz target.
We previously attempted to use DFSan directly in the libFuzzer process,
and that didn't work nicely.
Now we will try to collect the data flow information for the seed corpus
in a separate process (using this tracer), and then use it in the regular libFuzzer runs.
Reviewers: morehouse, pcc, Dor1s
Reviewed By: morehouse, Dor1s
Subscribers: delcypher, #sanitizers, llvm-commits
Differential Revision: https://reviews.llvm.org/D46666
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@332029 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
The SanitizerCommon-lsan-x86_64-Linux test failed due to the address of
the very first allocation ending up in the stack through "delete[]".
Workaround this by performing another allocation. The issue was only
present with optimization enabled, the test would pass with -O0.
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D46650
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@332020 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
Fixed two non-standard usages of sem_open in the libFuzzer library and
one NetBSD-related modification with test script.
- The return value to indicate error should be SEM_FAILED instead of
(void *)-1 (please refer to "RETURN VALUE" section in this [[
http://pubs.opengroup.org/onlinepubs/9699919799/functions/sem_open.html
| page ]]). Actually, SEM_FAILED != (void *)-1 holds in NetBSD.
- The SharedMemoryRegion::SemName function should return name
starting with slash. Because the behaviour of name which does not
start with slash is unspecified as the [[
http://pubs.opengroup.org/onlinepubs/9699919799/functions/sem_open.html
| "DESCRIPTION" section ]] specified:
> If name does not begin with the <slash> character, the effect is implementation-defined.
- The length of name is limited to 14 in NetBSD, it is suggested to
reduce the length of equivalence server name in the test script.
Patch by: Yang Zheng
Reviewers: vitalybuka, krytarowski, kcc
Reviewed By: kcc
Subscribers: kcc, #sanitizers, llvm-commits, joerg
Differential Revision: https://reviews.llvm.org/D46622
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@332003 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@331951 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
The try-lock guard change seems to be making this test fail on Mac, but
I haven't been able to reproduce the failure. Disabling the test on Mac
to fix build bot.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@331894 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
When out-of-memory or timeout occurs, threads can be stopped during
symbolization, thereby causing a deadlock when the OOM/TO handlers
attempt symbolization. We avoid this deadlock by skipping symbolization
if another thread is symbolizing.
Reviewers: kcc
Reviewed By: kcc
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D46605
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@331825 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
This addresses http://llvm.org/PR36790.
This change allows the XRay Basic Mode implementation to use the
string-based initialization routine provided through
`__xray_log_init_mode(...)`. In the process, we've also deprecated some
flags defined for the `XRAY_OPTIONS` environment variable.
We then introduce another environment variable that can control the XRay
Basic Mode implementation through `XRAY_BASIC_OPTIONS`.
We also rename files from `xray_inmemory_log` to `xray_basic_logging` to
be more in line with the mode implementation.
Depends on D46174.
Reviewers: echristo, kpw, pelikan, eizan
Reviewed By: kpw
Subscribers: mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D46246
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@331507 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
In this chage we add support for the string-based configuration
mechanism for configuring FDR mode.
We deprecate most of the `xray_fdr_log_*` flags that are set with the
`XRAY_OPTIONS` environment variable. Instead we make the FDR
implementation take defaults from the `XRAY_FDR_OPTIONS` environment
variable, and use the flags defined in `xray_fdr_flags.{h,cc,inc}` for
the options we support.
This change addresses http://llvm.org/PR36790.
Depends on D46173.
Reviewers: eizan, pelikan, kpw, echristo
Subscribers: llvm-commits, mgorny
Differential Revision: https://reviews.llvm.org/D46174
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@331506 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
This addresses http://llvm.org/PR36790.
The change Deprecates a number of functions and types in
`include/xray/xray_log_interface.h` to recommend using string-based
configuration of XRay through the __xray_log_init_mode(...) function. In
particular, this deprecates the following:
- `__xray_set_log_impl(...)` -- users should instead use the
`__xray_log_register_mode(...)` and `__xray_log_select_mode(...)` APIs.
- `__xray_log_init(...)` -- users should instead use the
`__xray_log_init_mode(...)` function, which also requires using the
`__xray_log_register_mode(...)` and `__xray_log_select_mode(...)`
functionality.
- `__xray::FDRLoggingOptions` -- in following patches, we'll be
migrating the FDR logging implementations (and tests) to use the
string-based configuration. In later stages we'll remove the
`__xray::FDRLoggingOptions` type, and ask users to migrate to using the
string-based configuration mechanism instead.
- `__xray::BasicLoggingOptions` -- same as `__xray::FDRLoggingOptions`,
we'll be removing this type later and instead rely exclusively on the
string-based configuration API.
We also update the documentation to reflect the new advice and remove
some of the deprecated notes.
Reviewers: eizan, kpw, echristo, pelikan
Reviewed By: kpw
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D46173
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@331503 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
It reverts commit r331484 because it caused test failures
ThreadSanitizer-x86_64 :: Darwin/gcd-groups-destructor.mm
ThreadSanitizer-x86_64 :: Darwin/libcxx-shared-ptr-stress.mm
ThreadSanitizer-x86_64 :: Darwin/xpc-race.mm
Foundation.h transitively includes <atomic>, so we have a case of benign mixing
<stdatomic.h> and <atomic>.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@331491 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Reviewers: kubamracek
Reviewed By: kubamracek
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D46363
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@331484 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
Fixes https://github.com/google/sanitizers/issues/788/, a deadlock
caused by multiple crashes happening at the same time. Before printing
a crash report, we now test and set an atomic flag. If the flag was
already set, the crash handler returns immediately.
Reviewers: kcc
Reviewed By: kcc
Subscribers: llvm-commits, kubamracek
Differential Revision: https://reviews.llvm.org/D46277
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@331310 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
1. Allow to suppress by current stack.
We generally allow to suppress by all main stacks.
Current is probably the stack one wants to use to
suppress such reports.
2. Fix last lock stack restoration.
We trimmed shadow value by storing it in u32.
This magically worked for the test that provoked
the report on the main thread. But this breaks
for locks in any other threads.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@331023 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Otherwise LLD will not align the .ASAN$GA section start, and
&__asan_globals + 1 will not be the start of the next real ASan global
metadata in .ASAN$GL.
We discovered this issue when attempting to use LLD on Windows in
Chromium: https://crbug.com/837090
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@330990 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Follow up to r330840 and r330849.
It seems that s390 is also not distinguishing illegal WRITE and READ memory
access.
Add s390x to XFAIL for the tests.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@330863 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
This adds `__scudo_print_stats` as an interface function to display the Primary
and Secondary allocator statistics for Scudo.
Reviewers: alekseyshl, flowerhack
Reviewed By: alekseyshl
Subscribers: delcypher, llvm-commits, #sanitizers
Differential Revision: https://reviews.llvm.org/D46016
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@330857 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
r330840 introduced two tests that may not be supported on all architectures.
powerpc64 seems to be one of those.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@330849 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
The read/write flag is set by manually decoding the instruction that caused
the exception. It is implemented this way because the cause register which
contains the needed flag was removed from the signal context structure which
the user handler receives from the kernel.
Patch by Milos Stojanovic.
Differential Revision: https://reviews.llvm.org/D45768
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@330840 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Although sprintf is not intercepted on Windows, this test can pass
if sprintf calls memmove, which is intercepted, so we can't XFAIL it.
Differential Revision: https://reviews.llvm.org/D45894
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@330469 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This upstreams a feature from the JFS solver's fork of LibFuzzer.
Differential Revision: https://reviews.llvm.org/D45675
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@330391 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
"N" suffix is added by the instrumentation and interface functions
are expected to be exported from the library as __hwasan_loadN* and
__hwasan_storeN*.
Reviewers: eugenis
Subscribers: kubamracek, delcypher, #sanitizers, llvm-commits
Differential Revision: https://reviews.llvm.org/D45739
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@330297 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Objective-C's @synchronize synchronization primitive uses calls to objc_sync_enter and objc_sync_exit runtime functions. In most cases, they end up just calling pthread_mutex_lock/pthread_mutex_unlock, but there are some cases where the synchronization from pthread_mutex_lock/pthread_mutex_unlock interceptors isn't enough. Let's add explicit interceptors for objc_sync_enter and objc_sync_exit to handle all cases.
Differential Revision: https://reviews.llvm.org/D45487
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@329982 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
IsStackOverflow only treats accesses within 512 bytes of SP as stack-overflow. This should really be the size of a page instead.
The scariness_score_test.cc triggers stack overflow with frames that are even larger than a page, which can also trigger a fault that will not be recognized as stack-overflow. Let's just use smaller frames.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@329980 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@329688 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
- Enabling libfuzzer on OpenBSD
- OpenBSD can t support asan, msan ... the tests can t be run.
Patch by David CARLIER
Reviewers: eugenis, phosek, vitalybuka
Reviewed By: vitalybuka
Subscribers: srhines, mgorny, krytarowski, llvm-commits, #sanitizers
Differential Revision: https://reviews.llvm.org/D44877
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@329631 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Differential Revision: https://reviews.llvm.org/D45303
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@329614 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
opened.
Summary:
Currently if the directory cannot be opened for a reason other than
non-existence (e.g. too many open file descriptors) the error message
printed is incredibly confusing.
Patch By: Alex Gaynor
Reviewers: kcc, morehouse
Reviewed By: morehouse
Subscribers: delcypher, llvm-commits, Sanitizers
Differential Revision: https://reviews.llvm.org/D45322
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@329438 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@329422 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
Under some circumstances (that I haven't dug further into), the first stack
frame for the test looks like:
`#0 0x4e6038 in __interceptor_memalign.localalias.1 ...compiler-rt/lib/asan/asan_malloc_linux.cc:113`
which isn't matched by the current CHECK.
Expand the CHECK to match aligned_alloc or memalign. Hopefully this should fix
the PowerPC issue as well, otherwise we'll bring back the FIXME.
Reviewers: alekseyshl
Reviewed By: alekseyshl
Subscribers: srhines, kubamracek, delcypher, #sanitizers, llvm-commits
Differential Revision: https://reviews.llvm.org/D45281
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@329226 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
ShadowCallStack does not yet have a runtime provided by compiler-rt, but
this change includes simple tests that make use of a very minimal
runtime in test/shadowcallstack/minimal_runtime.h
Reviewers: pcc, kcc, delcypher, eugenis, filcab
Reviewed By: pcc
Subscribers: kubamracek, mgorny, delcypher, llvm-commits, #sanitizers, kcc
Differential Revision: https://reviews.llvm.org/D44803
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@329210 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Move test/profile/instrprof-value-merge.c from r328987 to Linux directory.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@329016 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This patch fixes the following issues:
(1) The strong definition of the merge hook function was not working which
breaks the online value profile merging. This patch removes the weak
attribute of VPMergeHook and assigns the value dynamically.
(2) Truncate the proifle file so that we don't have garbage data at the end of
the file.
(3) Add new __llvm_profile_instrument_target_value() interface to do the value
profile update in batch. This is needed as the original incremental by 1
in __llvm_profile_instrument_target() is too slow for online merge.
Differential Revision: https://reviews.llvm.org/D44847
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@328987 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
As many other ASan tests already, has to disable these failing tests on
arm, armhf and aarch64 configs.
Differential Revision: https://reviews.llvm.org/D44404
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@328849 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
and the general version to avoid use of libstdc++ on non-Linux
platforms.
This is motivated by the fact that using `libstdc++` is deprecated on
Darwin and maybe removed some day.
Differential Revision: https://reviews.llvm.org/D44733
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@328775 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Differential Revision: https://reviews.llvm.org/D44404
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@328753 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Differential Revision: https://reviews.llvm.org/D44404
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@328742 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This check "CHECK: {{#0 0x.* in .*aligned_alloc}}" fails on ppc64be, gcc
build. Disabling the test for gcc for now.
Differential Revision: https://reviews.llvm.org/D44404
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@328741 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Differential Revision: https://reviews.llvm.org/D44404
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@328734 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
aligned_alloc is not always defined in headers.
Differential Revision: https://reviews.llvm.org/D44404
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@328726 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
Currently many allocator specific errors (OOM, for example) are reported as
a text message and CHECK(0) termination, not stack, no details, not too
helpful nor informative. To improve the situation, ASan detailed errors were
defined and reported under the appropriate conditions.
Issue: https://github.com/google/sanitizers/issues/887
Reviewers: eugenis
Subscribers: kubamracek, delcypher, #sanitizers, llvm-commits
Differential Revision: https://reviews.llvm.org/D44404
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@328722 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
To minimize testing surface (remove libstdc++ from the picture, for
one), make use-after-free c, not c++ test.
Differential Revision: https://reviews.llvm.org/D44705
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@328646 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Test fails on Darwin with -O2.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@328634 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
For a few tests, volatile was placed before the '*' in pointer
declarations, resulting in it applying to the underlying data rather
than the pointer itself. Placing volatile after the '*' allows us to
switch those tests to -O2.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@328633 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Relax use-after-free.cc test matching rules to cover more malloc/free
interceptor names variations.
Differential Revision: https://reviews.llvm.org/D44705
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@328630 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Replacing vfork with fork results in significant slowdown of certain
apps (in particular, memcached).
This reverts r327752.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@328600 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Speculative fix for build bot breakage on Mac.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@328576 91177308-0d34-0410-b5e6-96231b3b80d8
|