Age | Commit message (Collapse) | Author |
|
We've dropped support for python 2.5, so now we can use the forward
compatible "except ... as" syntax.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224181 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
Turn "allocator_may_return_null" common flag into an
Allocator::may_return_null bool flag. We want to make sure
that common flags are immutable after initialization. There
are cases when we want to change this flag in the allocator
at runtime: e.g. in unit tests and during ASan activation
on Android.
Test Plan: regression test suite, real-life applications
Reviewers: kcc, eugenis
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6623
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224148 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Differential Revision: http://reviews.llvm.org/D6591
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224117 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Differential Revision: http://reviews.llvm.org/D6590
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224116 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Enabling COMPILER_RT_INCLUDE_TESTS and updating tests/sanitizer_allocator_test.cc to remove Allocator64 related tests for MIPS.
Reviewed By: samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224101 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224087 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This commit changes the way we get fake stack from ASan runtime
(to find use-after-return errors) and the way we represent local
variables:
- __asan_stack_malloc function now returns pointer to newly allocated
fake stack frame, or NULL if frame cannot be allocated. It doesn't
take pointer to real stack as an input argument, it is calculated
inside the runtime.
- __asan_stack_free function doesn't take pointer to real stack as
an input argument. Now this function is never called if fake stack
frame wasn't allocated.
- __asan_init version is bumped to reflect changes in the ABI.
- new flag "-asan-stack-dynamic-alloca" allows to store all the
function local variables in a dynamic alloca, instead of the static
one. It reduces the stack space usage in use-after-return mode
(dynamic alloca will not be called if the local variables are stored
in a fake stack), and improves the debug info quality for local
variables (they will not be described relatively to %rbp/%rsp, which
are assumed to be clobbered by function calls). This flag is turned
off by default for now, but I plan to turn it on after more
testing.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224063 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Instead, rely on the fact that RAW_CHECK doesn't call mmap(),
and we'll be able to print an error message and kill a program.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224034 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary:
- Make sure mmap() is never called inside RawWrite function.
- Wrap a bunch of standalone globals in a ReportFile object.
- Make sure accesses to these globals are thread-safe.
- Fix report_path functionality on Windows, where
__sanitizer_set_report_path() would break program.
I've started this yak shaving in order to make
"CommonFlags::mmap_limit_mb" immutable. Currently we drop this flag
to zero before printing an error message.
Test Plan: regression test suite
Reviewers: kcc, glider
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6595
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224031 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Differential Revision: http://reviews.llvm.org/D6504
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224030 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
GetRSS is used in Go build.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224023 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
These are fake and not actual PCs, more like function IDs.
Pass them to external symbolizer untouched.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224022 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224018 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223932 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Should fix PR21476.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223925 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Each of the object formats use a different directive for selecting the constant
section. Use a macro to avoid the duplication across a number of files. Also
correct a small macro mismatch on the Windows case (HIDDEN_DIRECTIVE -> HIDDEN).
Patch by Vadim Chugunov!
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223910 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223909 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Remove unused variables and definitions in CMake files
for TSan and DD (deadlock detector).
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223908 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
On Darwin, compiler_rt uses magic linker symbols to find the profile
counters in the __DATA segment. This is a reasonable method for
normal, hosted, userspace programs. However programs with custom
memory layouts, such as the kernel, will need to tell compiler_rt
explicitly where to find these sections.
Patch by Lawrence D'Anna. Thanks!
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223840 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223732 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223730 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Suggested in http://reviews.llvm.org/D6547.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223715 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Intercept wcstod, wcstof, wcstold, wcstol, wcstoul, wcstoll, wcstoull.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223650 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
transfered to the device.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223540 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Reviewed at http://reviews.llvm.org/D6488
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223533 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223519 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Minor changes to enable DFSAN on MIPS64
Patch by Kumar Sukhani!
Differential Revision: http://reviews.llvm.org/D6437
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223517 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
(compiler-rt part)
Reviewed at http://reviews.llvm.org/D6488
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223514 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Adds 3 new suppression types, "interceptor_name", "interceptor_via_fun", "interceptor_via_lib".
Reviewed at http://reviews.llvm.org/D6280.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223508 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Move thread context creation into AsanThread::Create().
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223483 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This was causing build failures on llvm-clang-lld-x86_64-centos-6.5 for some
reason. Anyway, the new way is better because we no longer rely on std::thread
implementation details.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223480 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223477 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
this test is flaky because of ASLR
app memory is 7e8000000000-800000000000,
there may or may not be a 1TB hole depending on
where ASLR will choose to map libraries
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223469 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
so that user does not map something there ahead of us
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223456 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
In the current scheme of things, the call to ThreadStart() in the child
thread is not synchronized with the parent thread. So, if a pointer is passed to
pthread_create, there may be a window of time during which this pointer will not
be discoverable by LSan. I.e. the pthread_create interceptor has already
returneed and thus the pointer is no longer on the parent stack, but we don't
yet know the location of the child stack. This has caused bogus leak reports
(see http://llvm.org/bugs/show_bug.cgi?id=21621/).
This patch makes the pthread_create interceptor wait until the child thread is
properly registered before returning.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223419 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
target (PR21719)
When CMake builds a dynamic library on Windows, the .dll file's location is
determined by the RUNTIME_OUTPUT_DIRECTORY, which we were previously not
setting.
This means for example that clang_rt.asan_dynamic-i386.dll will get built
and installed in the same directory as the corresponding .lib file,
instead of being built in the bin/ directory and not installed at all.
Differential Revision: http://reviews.llvm.org/D6508
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223387 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223355 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
compiler-rt part
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223314 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223258 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Previously, all origin ids were "chained" origins, i.e values of
ChainedOriginDepot. This added a level of indirection for simple
stack and heap allocation, which were represented as chains of
length 1. This costs both RAM and CPU, but provides a joined 2**29
origin id space. It also made function (any instrumented function)
entry non-async-signal-safe, but that does not really matter because
memory stores in track-origins=2 mode are not async-signal-safe anyway.
With this change, the type of the origin is encoded in origin id.
See comment in msan_origin.h for more details. This reduces chained and stack
origin id range to 2**28 each, but leaves extra 2**31 for heap origins.
This change should not have any user-visible effects.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223233 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This test does an intentional use-after-return, but this is not the focus of
the test, so ignore it.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223230 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223229 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
It has been fixed a long time ago.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223226 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223181 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Summary: No functionality change.
Test Plan: make check-all
Reviewers: kcc
Reviewed By: kcc
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6472
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223164 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223157 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Return a linked list of AddressInfo objects, instead of using an array of
these objects as an output parameter. This simplifies the code in callers
of this function (especially TSan).
Fix a few memory leaks from internal allocator, when the returned
AddressInfo objects were not properly cleared.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223145 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Differential Revision: http://reviews.llvm.org/D6478
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223122 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Differential Revision: http://reviews.llvm.org/D6462
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223121 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223094 91177308-0d34-0410-b5e6-96231b3b80d8
|