summaryrefslogtreecommitdiff
path: root/lib/ubsan_minimal
AgeCommit message (Collapse)Author
2017-12-15[ubsan-minimal] Add a path for non-POSIX (and bare-metal) use of the libraryFilipe Cabecinhas
Summary: Hook on -DKERNEL_USE (which is also used in lib/builtins) to not import strlen and not rely on write() being implemented with the stderr on fd 2. With this, the only requirements to use this library are: - "Good enough" std::atomic<void*> and std::atomic<int> - abort() being implemented - ubsan_message(const char*) being implemented Reviewers: eugenis Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D39791 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@320831 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-11[ubsan-minimal] Get rid of the libc++ dependency.Evgeniy Stepanov
Summary: Use -nodefaultlibs. Replace std:atomic with sanitizer atomics. Reviewers: vitalybuka, kongyi, EricWF Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D39934 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@317969 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-19[ubsan-minimal] Make the interface more compatible with RTUBSanVedant Kumar
This eliminates a few inconsistencies between the symbol sets exported by RTUBSan and RTUBSan_minimal: * Handlers for nonnull_return were missing from the minimal RT, and are now added in. * The minimal runtime exported recoverable handlers for builtin_unreachable and missing_return. These are not supposed to exist, and are now removed. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313614 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-11Runtime detection of android_set_abort_message.Evgeniy Stepanov
Summary: Use runtime detection (with a weak-undef symbol) of android_set_abort_message availability. Android NDK provides a single version of the ASan runtime library to be used for any target API level, which makes compile-time feature detection impossible (the library itself is built at API level 9). Reviewers: vitalybuka Subscribers: srhines, llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D37716 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@312973 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-11[ubsan-minimal] Enable on DarwinVedant Kumar
Testing: check-ubsan-minimal Differential Revision: https://reviews.llvm.org/D37646 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@312959 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-29Disable ubsan-minimal on Darwin.Evgeniy Stepanov
Should un-break this bot: http://green.lab.llvm.org/green//job/clang-stage1-configure-RA_build/38264/consoleFull git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@312036 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-29Minimal runtime for UBSan.Evgeniy Stepanov
Summary: An implementation of ubsan runtime library suitable for use in production. Minimal attack surface. * No stack traces. * Definitely no C++ demangling. * No UBSAN_OPTIONS=log_file=/path (very suid-unfriendly). And no UBSAN_OPTIONS in general. * as simple as possible Minimal CPU and RAM overhead. * Source locations unnecessary in the presence of (split) debug info. * Values and types (as in A+B overflows T) can be reconstructed from register/stack dumps, once you know what type of error you are looking at. * above two items save 3% binary size. When UBSan is used with -ftrap-function=abort, sometimes it is hard to reason about failures. This library replaces abort with a slightly more informative message without much extra overhead. Since ubsan interface in not stable, this code must reside in compiler-rt. Reviewers: pcc, kcc Subscribers: srhines, mgorny, aprantl, krytarowski, llvm-commits Differential Revision: https://reviews.llvm.org/D36810 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@312029 91177308-0d34-0410-b5e6-96231b3b80d8