| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
__sanitizer_stat_init is called for the executable first, then the
shared object. In WriterModuleReport(), the information for the shared
object will be recorded first. It'd be nice to get rid of the order
requirement of static constructors. (This should make .ctors platforms
work.)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These lit configuration files are really Python source code. Using the
.py file extension helps editors and tools use the correct language
mode. LLVM and Clang already use this convention for lit configuration,
this change simply applies it to all of compiler-rt.
Reviewers: vitalybuka, dberris
Differential Revision: https://reviews.llvm.org/D63658
llvm-svn: 364591
|
|
|
|
|
|
|
|
|
|
|
|
| |
Making the library slighty more portable.
Reviewers: vitalybuka, krytarowski
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D51682
llvm-svn: 343510
|
|
|
|
|
|
| |
__builtin___clear_cache is also present on X86 and does the right thing (i.e. nop) there.
llvm-svn: 335997
|
|
|
|
|
|
|
| |
Fixes intermittent crashes on Android.
Also add PROT_READ to the code mapping for no real reason.
llvm-svn: 335943
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: vitalybuka, pcc
Subscribers: llvm-commits, srhines
Differential Revision: https://reviews.llvm.org/D38911
llvm-svn: 315922
|
|
|
|
| |
llvm-svn: 315775
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Enable check-cfi and check-ubsan on Android.
Check-ubsan includes standalone and ubsan+asan, but not tsan or msan.
Cross-dso cfi tests are disabled for now.
Reviewers: vitalybuka, pcc
Subscribers: srhines, kubamracek, llvm-commits, mgorny
Differential Revision: https://reviews.llvm.org/D38608
llvm-svn: 315105
|
|
|
|
| |
llvm-svn: 305534
|
|
|
|
|
|
|
| |
Run tests in all configurations:
(standalone, with devirtualization) * (gold, lld) * (lto, thinlto)
llvm-svn: 301016
|
|
|
|
|
|
| |
The test is using indirect calls.
llvm-svn: 300900
|
|
|
|
| |
llvm-svn: 286612
|
|
|
|
|
|
|
|
|
|
|
| |
Avoid crashing when printing diagnostics for vtable-related CFI
errors. In diagnostic mode, the frontend does an additional check of
the vtable pointer against the set of all known vtable addresses and
lets the runtime handler know if it is safe to inspect the vtable.
http://reviews.llvm.org/D16824
llvm-svn: 259717
|
|
|
|
| |
llvm-svn: 259082
|
|
|
|
| |
llvm-svn: 259007
|
|
|
|
|
|
|
| |
test/cfi/cross-dso/dlopen.cpp:67:45: warning: GCC does not allow 'aligned' attribute in this position on a function definition [-Wgcc-compat]
extern "C" void do_nothing() __attribute__((aligned(4096))) {}
llvm-svn: 258992
|
|
|
|
|
|
| |
This should fix the build on Mac 10.8 and earlier.
llvm-svn: 258988
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change enables diagnostics when the target address for a CFI
check is out of bounds of any known library, or even not in the
limits of the address space. This happens when casting pointers to
uninitialized memory.
Ubsan code does not yet handle some of these situations correctly,
so it is still possible to see a segmentation fault instead of a
proper diagnostic message once in a while.
llvm-svn: 258879
|
|
|
|
|
|
|
|
| |
Move all internal stuff into namespace __cfi.
Remove the double underscore prefix from anything that's now inside
the namespace.
llvm-svn: 258859
|
|
|
|
|
|
| |
Add dlopen/dlclose interceptors to update CFI shadow for loaded/unloaded libraries.
llvm-svn: 258857
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* add __cfi_slowpath_diag with a 3rd parameter which is a pointer to
the diagnostic info for the ubsan handlers.
*__cfi_check gets a 3rd parameter as well.
* unify vcall/cast/etc and icall diagnostic info format, and merge
the handlers to have a single entry point (actually two points due
to abort/noabort variants).
* tests
Note that this comes with a tiny overhead in the non-diag mode:
cfi_slowpath must pass 0 as the 3rd argument to cfi_check.
llvm-svn: 258744
|
|
|
|
|
|
|
|
|
| |
This is part of a new statistics gathering feature for the sanitizers.
See clang/docs/SanitizerStats.rst for further info and docs.
Differential Revision: http://reviews.llvm.org/D16176
llvm-svn: 257972
|
|
|
|
|
|
| |
CFI shadow for non-CFI libraries should be "unchecked", not "invalid".
llvm-svn: 256285
|
|
|
|
|
|
| |
Mac is missing the driver support to link the CFI runtime library.
llvm-svn: 255730
|
|
This is an initial version of the runtime cross-DSO CFI support
library.
It contains a number of FIXMEs, ex. it does not support the
diagnostic mode nor dlopen/dlclose, but it works and can be tested.
Diagnostic mode, in particular, would require some refactoring (we'd
like to gather all CFI hooks in the UBSan library into one function
so that we could easier pass the diagnostic information down to
__cfi_check). It will be implemented later.
Once the diagnostic mode is in, I plan to create a second test
configuration to run all existing tests in both modes. For now, this
patch includes only a few new cross-DSO tests.
llvm-svn: 255695
|