| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
| |
Allow user to override shadow scale in compiler_rt by passing
-DCOMPILER_RT_ASAN_SHADOW_SCALE=n to CMake. Propagate the override
shadow scale value via a compiler define to compiler-rt and asan
tests. Tests will use the define to partially disable unsupported
tests. Set "-mllvm -asan-mapping-scale=<n>" for compiler_rt tests.
Differential Revision: https://reviews.llvm.org/D39469
llvm-svn: 318038
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The following kernel change has moved ET_DYN base to 0x4000000 on arm32:
https://marc.info/?l=linux-kernel&m=149825162606848&w=2
Switch to dynamic shadow base to avoid such conflicts in the future.
Reserve shadow memory in an ifunc resolver, but don't use it in the instrumentation
until PR35221 is fixed. This will eventually let use save one load per function.
Reviewers: kcc
Subscribers: aemerson, srhines, kubamracek, kristof.beyls, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D39393
llvm-svn: 317943
|
|
|
|
| |
llvm-svn: 317871
|
|
|
|
| |
llvm-svn: 317869
|
|
|
|
| |
llvm-svn: 317868
|
|
|
|
| |
llvm-svn: 317867
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: eugenis
Subscribers: llvm-commits, kubamracek
Differential Revision: https://reviews.llvm.org/D39870
llvm-svn: 317843
|
|
|
|
|
|
| |
Name does not need to enumerate arguments.
llvm-svn: 317774
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When building LLVM on x86_64-pc-linux-gnu (Fedora 25) with the bundled gcc 6.4.1
which uses gld 2.26.1-1.fc25, the dynamic/Asan-i386-calls-Dynamic-Test and
dynamic/Asan-i386-inline-Dynamic-Test tests failed to link with
/usr/bin/ld: /var/scratch/gcc/llvm/dist/lib/clang/6.0.0/lib/linux/libclang_rt.asan-i386.so: fork: invalid version 21 (max 0)
/var/scratch/gcc/llvm/dist/lib/clang/6.0.0/lib/linux/libclang_rt.asan-i386.so: error adding symbols: Bad value
I tried building with a self-compiled gcc 7.1.0 using gld 2.28, but the error remained.
It seems the error has been hit before (cf. https://reviews.llvm.org/rL314085), but
no real explanation has been found.
However, the problem goes away when linking the i386 libclang_rt.asan with a version
script just like every other variant is. Not using the version script in this single case
dates back to the initial introduction of the version script in r236551, but this change
was just checked in without any explanation AFAICT.
Since I've not found any other workaround and no reason for not always using the
version script, I propose to do so.
Tested on x86_64-pc-linux-gnu.
Patch by Rainer Orth.
Differential Revision: https://reviews.llvm.org/D39795
llvm-svn: 317738
|
|
|
|
|
|
|
| |
Future change will introduce GetMaxVirtualAddress that will not take
the kernel area into account.
llvm-svn: 317638
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ASan allocator stores the requested alignment for new and new[] calls
and on delete and delete[] verifies that alignments do match.
The representable alignments are: default alignment, 8, 16, 32, 64, 128,
256 and 512 bytes. Alignments > 512 are stored as 512, hence two
different alignments > 512 will pass the check (possibly masking the bug),
but limited memory requirements deemed to be a resonable tradeoff for
relaxed conditions.
The feature is controlled by new_delete_type_mismatch flag, the same one
protecting new/delete matching size check.
Differential revision: https://reviews.llvm.org/D38574
Issue: https://github.com/google/sanitizers/issues/799
llvm-svn: 316595
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
They might not be mapped on some platforms such as Win64. In
particular, this happens if the user address is null. There will not be
any shadow memory 5*16 bytes before the user address. This happens on
Win64 in the error_report_callback.cc test case. It's not clear why this
isn't a problem on Linux as well.
Fixes PR35058
Reviewers: vitalybuka
Subscribers: kubamracek, llvm-commits
Differential Revision: https://reviews.llvm.org/D39260
llvm-svn: 316589
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Similar to NetBSD, in FreeBSD, the first returned entry when callbacks
are done via dl_iterate_phdr will return the main program. Ignore that
entry when checking that the dynamic ASan lib is loaded first.
Reviewers: eugenis, krytarowski, emaste, joerg
Reviewed By: eugenis, krytarowski
Subscribers: kubamracek, llvm-commits
Differential Revision: https://reviews.llvm.org/D39253
llvm-svn: 316487
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Purging allocator quarantine and returning memory to OS might be desired
between fuzzer iterations since, most likely, the quarantine is not
going to catch bugs in the code under fuzz, but reducing RSS might
significantly prolong the fuzzing session.
Reviewers: cryptoad
Subscribers: kubamracek, llvm-commits
Differential Revision: https://reviews.llvm.org/D39153
llvm-svn: 316347
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: .
Reviewers: cryptoad
Subscribers: kubamracek, llvm-commits
Differential Revision: https://reviews.llvm.org/D38834
llvm-svn: 315730
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove the redundant dependency on 'gtest' target from the dynamic tests
in non-MSVC environment. The tests reuse compiled objects
from ASAN_INST_TEST_OBJECTS, and therefore they have been built against
gtest already.
This both fixes the spurious dependency on 'gtest' target that breaks
stand-alone builds, and brings the dynamic tests more in line with
regular tests which do not pass this dependency
to add_compiler_rt_test() through generate_compiler_rt_tests().
Differential Revision: https://reviews.llvm.org/D38840
llvm-svn: 315620
|
|
|
|
| |
llvm-svn: 315132
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This change moves cxx-abi library in asan/ubsan/dd link command line
ahead of other libraries, such as pthread/rt/dl/c/gcc. Given that
cxx-abi may be the full libstdc++/libc++, it makes sense for it to be
ahead of libc and libgcc, at least.
The real motivation is Android, where in the arm32 NDK toolchain
libstdc++.a is actually a linker script that tries to sneak LLVM's
libunwind ahead of libgcc's. Wrong library order breaks unwinding.
Reviewers: srhines, danalbert
Subscribers: aemerson, kubamracek, mgorny, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D38520
llvm-svn: 314948
|
|
|
|
|
|
|
| |
The link in the "Shadow memory range interleaves with an existing
memory mapping" error message was pointing to the wrong bug.
llvm-svn: 314441
|
|
|
|
|
|
|
|
| |
dlclose itself might touch it, so better return it to the state it was
before. I don't know how to create a test for this as it would require
chaning dlclose itself.
llvm-svn: 314415
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
compunit's .data section. This vector is not poisoned. Because of this the
first symbol of the following section has no left red zone. As a result, ASan
cannot detect underflow for such symbols.
Poison ASan allocated metadata, it should not be accessible to user code.
This fix does not eliminate the problem with missing left red zones but it
reduces the set of vulnerable symbols from first symbols in each input data
section to first symbols in the output section of the binary.
Differential Revision: https://reviews.llvm.org/D38056
llvm-svn: 314365
|
|
|
|
|
|
| |
For consistency with asan, msan, tsan and ubsan.
llvm-svn: 314048
|
|
|
|
|
|
| |
This allows to avoid constructor parameter
llvm-svn: 314040
|
|
|
|
| |
llvm-svn: 314008
|
|
|
|
|
|
| |
reporting_thread_tid_
llvm-svn: 314007
|
|
|
|
|
|
|
|
|
|
|
| |
Don't overwrite exit code in LSan when running on top of ASan in recovery mode
to avoid breakage of users code due to found leaks.
Patch by Slava Barinov.
Differential Revision: https://reviews.llvm.org/D38026
llvm-svn: 313966
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Fixes https://github.com/google/sanitizers/issues/858
Reviewers: eugenis, dvyukov
Subscribers: kubamracek, llvm-commits
Differential Revision: https://reviews.llvm.org/D38019
llvm-svn: 313835
|
|
|
|
| |
llvm-svn: 313727
|
|
|
|
|
|
|
| |
This is used only to make fast = true in GetStackTraceWithPcBpAndContext
on SANITIZER_FREEBSD and SANITIZER_NETBSD and can be done explicitly.
llvm-svn: 313517
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Part of https://github.com/google/sanitizers/issues/637
Reviewers: eugenis, alekseyshl
Subscribers: srhines, kubamracek, llvm-commits
Differential Revision: https://reviews.llvm.org/D37889
llvm-svn: 313449
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Part of https://github.com/google/sanitizers/issues/637
Reviewers: eugenis, alekseyshl
Subscribers: kubamracek
Differential Revision: https://reviews.llvm.org/D37844
llvm-svn: 313310
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The only difference from ErrorDeadlySignal is reporting code and it lives in
sanitizer common.
Part of https://github.com/google/sanitizers/issues/637
Reviewers: eugenis, alekseyshl, filcab
Subscribers: llvm-commits, kubamracek
Differential Revision: https://reviews.llvm.org/D37868
llvm-svn: 313309
|
|
|
|
| |
llvm-svn: 313227
|
|
|
|
| |
llvm-svn: 313225
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: eugenis, alekseyshl
Subscribers: kubamracek, dberris
Differential Revision: https://reviews.llvm.org/D37827
llvm-svn: 313223
|
|
|
|
| |
llvm-svn: 313177
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Part of https://github.com/google/sanitizers/issues/637
Reviewers: eugenis, alekseyshl, filcab
Subscribers: kubamracek, llvm-commits, dberris
Differential Revision: https://reviews.llvm.org/D37793
llvm-svn: 313168
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Information stored there is often been passed along with SignalContext.
Part of https://github.com/google/sanitizers/issues/637
Reviewers: eugenis, alekseyshl
Subscribers: kubamracek, llvm-commits, dberris
Differential Revision: https://reviews.llvm.org/D37792
llvm-svn: 313167
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sanitizer_common
Summary: Part of https://github.com/google/sanitizers/issues/637
Reviewers: eugenis, alekseyshl
Subscribers: kubamracek, llvm-commits, dberris
Differential Revision: https://reviews.llvm.org/D37766
llvm-svn: 313117
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Part of https://github.com/google/sanitizers/issues/637
Reviewers: eugenis, alekseyshl
Subscribers: kubamracek, llvm-commits, dberris
Differential Revision: https://reviews.llvm.org/D37764
llvm-svn: 313115
|
|
|
|
|
|
|
|
|
|
| |
Fuchsia's lowest API layer has been renamed from Magenta to Zircon.
Patch by Roland McGrath
Differential Revision: https://reviews.llvm.org/D37770
llvm-svn: 313106
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Part of https://github.com/google/sanitizers/issues/637
Reviewers: eugenis, alekseyshl
Subscribers: kubamracek, dberris, llvm-commits
Differential Revision: https://reviews.llvm.org/D37536
llvm-svn: 312987
|
|
|
|
|
|
|
|
| |
Windows is broken.
This reverts commit r312951
llvm-svn: 312984
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Part of https://github.com/google/sanitizers/issues/637
Reviewers: eugenis, alekseyshl
Subscribers: kubamracek, dberris, llvm-commits
Differential Revision: https://reviews.llvm.org/D37536
llvm-svn: 312951
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Removed redundant End*() methods which defined same way.
Removed redundant Warning() methods.
Reviewers: eugenis
Subscribers: kubamracek, llvm-commits, dberris
Differential Revision: https://reviews.llvm.org/D37549
llvm-svn: 312950
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Part of https://github.com/google/sanitizers/issues/637
Reviewers: eugenis, alekseyshl
Subscribers: llvm-commits, kubamracek
Differential Revision: https://reviews.llvm.org/D37609
llvm-svn: 312858
|
|
|
|
|
|
| |
Point to https://github.com/google/sanitizers/issues/856 as a possible cause of the failed mapping.
llvm-svn: 312687
|
|
|
|
|
|
|
|
|
|
| |
ld.config.txt defines linker namespaces in a way that is incompatible
with ASan. Remove the file when installing ASan on an Android O
(8.0.x) device.
Patch by Jiyong Park.
llvm-svn: 312581
|
|
|
|
| |
llvm-svn: 312394
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This revision contains various cleanups.
Sponsored by <The NetBSD Foundation>
Reviewers: kcc, vitalybuka, joerg, eugenis
Reviewed By: kcc
Subscribers: emaste, srhines, llvm-commits, kubamracek, mgorny, #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D37244
llvm-svn: 312188
|