Commit Graph

6 Commits

Author SHA1 Message Date
Vitaly Buka 7c180fa915 [ubsan-minimal] update comments in CMakeLists.txt
Summary:
Prepend minimal when UBsan is mentioned and delete a dead comment

Patch by Igor Sugak

Reviewers: eugenis, pcc

Reviewed By: eugenis

Subscribers: mgorny, llvm-commits, #sanitizers

Differential Revision: https://reviews.llvm.org/D53826

llvm-svn: 345557
2018-10-30 01:20:12 +00:00
Petr Hosek 1608ca6d64 [CMake] Build shared version of runtimes for Fuchsia
Fuchsia is no longer treated as UNIX which means we need to explicitly
enable building of shared versions of runtimes.

Differential Revision: https://reviews.llvm.org/D46609

llvm-svn: 331922
2018-05-09 21:24:06 +00:00
Evgeniy Stepanov 24bc8d5905 [ubsan-minimal] Get rid of the libc++ dependency.
Summary:
Use -nodefaultlibs.
Replace std:atomic with sanitizer atomics.

Reviewers: vitalybuka, kongyi, EricWF

Subscribers: mgorny, llvm-commits

Differential Revision: https://reviews.llvm.org/D39934

llvm-svn: 317969
2017-11-11 02:32:02 +00:00
Vedant Kumar 7669679e82 [ubsan-minimal] Enable on Darwin
Testing: check-ubsan-minimal

Differential Revision: https://reviews.llvm.org/D37646

llvm-svn: 312959
2017-09-11 21:37:53 +00:00
Evgeniy Stepanov 3bafa546d0 Disable ubsan-minimal on Darwin.
Should un-break this bot:
http://green.lab.llvm.org/green//job/clang-stage1-configure-RA_build/38264/consoleFull

llvm-svn: 312036
2017-08-29 21:15:08 +00:00
Evgeniy Stepanov 6d2b6f0a5f Minimal runtime for UBSan.
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

llvm-svn: 312029
2017-08-29 20:03:51 +00:00