summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/ubsan
Commit message (Collapse)AuthorAgeFilesLines
...
* [UBSan] Allow to suppress reports from vptr checker for specified types.Alexey Samsonov2014-08-054-8/+29
| | | | | | Based on http://reviews.llvm.org/D4702 by Byoungyoung Lee! llvm-svn: 214833
* [UBSan] Introduce ScopedReport object.Alexey Samsonov2014-07-304-90/+143
| | | | | | | | | | | | | | | | | This object is used to encapsulate all actions that need to be done before/after printing UBSan diagnostics. Currently these actions are: * locking a mutex to ensure that UBSan diagnostics from several threads won't mix with each other and with other sanitizers' reports * killing a program once the report is printed (if necessary). Use this object in all UBSan handlers. Unify the way we implement fatal and non-fatal handlers by making all the handlers simple one-liners that redirect __ubsan_handle_foo(_abort)? to handleFooImpl(). llvm-svn: 214279
* [UBSan] Allow to override runtime flags defaults by providingAlexey Samsonov2014-07-301-1/+16
| | | | | | | compile definition UBSAN_DEFAULT_OPTIONS when building the runtime. This mirrors similar ASan functionality. llvm-svn: 214259
* [UBSan] Move all runtime flags parsing to ubsan_flags.cc.Alexey Samsonov2014-07-293-12/+19
| | | | | | No functionality change. llvm-svn: 214258
* [UBSan] Get pc/bp for stack unwinding as early as possible.Alexey Samsonov2014-07-292-10/+6
| | | | | | | | This will ensure that stack frames in error reports will not contain internal UBSan failures, and frame #0 will be the actual place in the program where the error happens. llvm-svn: 214245
* [UBSan] Build part of UBSan runtime that can be linked into C programs with ↵Alexey Samsonov2014-07-291-2/+4
| | | | | | -fno-rtti flag. llvm-svn: 214232
* [UBSan] Initialize symbolizer inside __ubsan::Init().Alexey Samsonov2014-07-262-3/+5
| | | | | | | | We used to initialize symbolizer lazily, but this doesn't work in various sandboxed environments. Instead, let's be consistent with the rest of sanitizers. llvm-svn: 214006
* [UBSan] Call UBSan initialization as early as possible.Alexey Samsonov2014-07-254-26/+92
| | | | | | | | | | | | | Specifically, use .preinit_array initialization on Linux and dynamic global initializer on another platforms. Historically UBSan didn't have any initialization code and its runtime was stateless. This is no longer the case - UBSan relies on some non-trivial functionality from sanitizer_common (e.g. online symbolization) and is now configurable by runtime flags. Additionally, we've dropped support for enabling UBSan only for a few shared objects, so UBSan is now always linked into the main executable, so now we can use similar initialization as all the rest sanitizers. llvm-svn: 213983
* Fix unused-variable warningAlexey Samsonov2014-07-231-0/+1
| | | | llvm-svn: 213786
* [UBSan] Add the ability to dump call stacks to -fsanitize=vptrAlexey Samsonov2014-07-236-0/+93
| | | | | | | | | | | This change introduces the first UBSan-specific runtime flag: print_stacktrace (off by default). It can be set in UBSAN_OPTIONS to unwind and print call stacks in addition to diagnostic messages. For now these stacks are printed only in vptr checker. This change is based on http://reviews.llvm.org/D4410 by Byoungyoung Lee! llvm-svn: 213783
* [UBSan] Introduce UBSAN_OPTIONS environment variable.Alexey Samsonov2014-07-231-3/+5
| | | | | | | | | | If UBSan is run in a standalone mode (w/o any other sanitizer), it still uses functions from sanitizer_common, some of which depend on the value of runtime flags. Allow to override the default values of these flags with UBSAN_OPTIONS variable. In particular, UBSAN_OPTIONS=symbolize=0 can be used to turn off online symbolization. llvm-svn: 213782
* [Sanitizer] Merge AnsiColorDecorator and SanitizerCommonDecorator, use the ↵Alexey Samsonov2014-06-131-7/+17
| | | | | | latter in UBSan llvm-svn: 210959
* [UBSan] Respect runtime flag for colorizing reportsAlexey Samsonov2014-06-131-2/+2
| | | | llvm-svn: 210950
* [ubsan] handle long double in 32-bit mode; part of the patch by Marek PolacekKostya Serebryany2014-05-231-0/+1
| | | | llvm-svn: 209516
* [CMake] Rename add_compiler_rt_static_runtime to add_compiler_rt_runtime.Alexey Samsonov2014-03-311-2/+2
| | | | | | | | Soon there will be an option to build compiler-rt parts as shared libraries on Linux. Extracted from http://llvm-reviews.chandlerc.com/D3042 by Yuri Gribov. llvm-svn: 205183
* Enable UBSan on FreeBSD. Patch by Viktor Kutuzov.Alexey Samsonov2014-02-251-3/+3
| | | | llvm-svn: 202122
* [CMake] Add top-level target for each compiler-rt library, and add ↵Alexey Samsonov2014-02-181-0/+2
| | | | | | 'compiler-rt' target encompassing them all. llvm-svn: 201556
* Move UBSan test suite under test/Alexey Samsonov2014-02-1433-857/+4
| | | | llvm-svn: 201401
* Move shared configs for lit test suites to test/ and unittests/ directoriesAlexey Samsonov2014-02-142-2/+2
| | | | llvm-svn: 201399
* [UBSan] Parse common runtime flags before using a symbolizerAlexey Samsonov2014-02-121-0/+19
| | | | llvm-svn: 201217
* Don't create check-ubsan and check-dfsan commands if they are not supported ↵Alexey Samsonov2014-01-241-1/+3
| | | | | | on this platform llvm-svn: 199979
* [Sanitizers] Rename Symbolizer::SymbolizeCode to Symbolizer::SymbolizePCTimur Iskhodzhanov2013-12-181-1/+1
| | | | llvm-svn: 197569
* ubsan: Fix typo in 'TypeCheck/vptr.cpp' test to resolve 32bit failure.Will Dietz2013-12-091-1/+1
| | | | llvm-svn: 196799
* Fix integer tests on platforms where uint64_t is 'unsigned long long'.Will Dietz2013-12-063-3/+3
| | | | llvm-svn: 196612
* [UBSan] Fix warning by specifying __extension__ before __int128Alexey Samsonov2013-11-251-2/+2
| | | | llvm-svn: 195648
* [UBSan] Make sure ASan and UBSan interact properly by running each test from ↵Alexey Samsonov2013-11-1433-80/+105
| | | | | | UBSan test suite with and without ASan llvm-svn: 194698
* [UBSan] Update UBSan location rendering to match r194686Alexey Samsonov2013-11-141-6/+8
| | | | llvm-svn: 194687
* Overhaul the symbolizer interface.Peter Collingbourne2013-10-254-7/+3
| | | | | | | | | | | | | | | | | | | | | | This moves away from creating the symbolizer object and initializing the external symbolizer as separate steps. Those steps now always take place together. Sanitizers with a legacy requirement to specify their own symbolizer path should use InitSymbolizer to initialize the symbolizer with the desired path, and GetSymbolizer to access the symbolizer. Sanitizers with no such requirement (e.g. UBSan) can use GetOrInitSymbolizer with no need for initialization. The symbolizer interface has been made thread-safe (as far as I can tell) by protecting its member functions with mutexes. Finally, the symbolizer interface no longer relies on weak externals, the introduction of which was probably a mistake on my part. Differential Revision: http://llvm-reviews.chandlerc.com/D1985 llvm-svn: 193448
* Runtime support for the indirect function call checker.Peter Collingbourne2013-10-208-0/+68
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D1339 llvm-svn: 193060
* [ubsan] Introduce %clangxx substitution for all C++ tests.Peter Collingbourne2013-10-2024-55/+57
| | | | llvm-svn: 193059
* Make the big array in the UBSan C++ runtime be zero-initialized to dramaticallyRichard Smith2013-10-171-7/+9
| | | | | | | | | | shrink the binary size of the ubsan runtime. Also fix a bug where long-running processes could eventually trigger a crash in the runtime by filling up the cache. I've not found a nice way to add a test for this crasher; ideas welcome. llvm-svn: 192931
* Refactor the usage of strip_path_prefix option and make it more consistent ↵Alexey Samsonov2013-10-042-11/+9
| | | | | | across sanitizers llvm-svn: 191943
* This fixme is resolved, fix the test.Nick Lewycky2013-10-021-2/+1
| | | | llvm-svn: 191810
* Make the InvalidValueData take a SourceLocation.Nick Lewycky2013-10-022-6/+7
| | | | llvm-svn: 191807
* [Sanitizer] Refactor symbolization interface: use class instead of several ↵Alexey Samsonov2013-09-101-2/+3
| | | | | | functions. Move some code around to get rid of extra source files llvm-svn: 190410
* Generate list of symbols exported from sanitizer runtimes only on 64-bit UnixAlexey Samsonov2013-08-281-7/+10
| | | | llvm-svn: 189454
* Properly generate lists of exported symbols for sanitizer runtimesAlexey Samsonov2013-08-273-6/+8
| | | | | | | | | This change adds a Python script that is invoked for the just-built sanitizer runtime to generate the list of exported symbols passed to the linker. By default, it contains interceptors and sanitizer interface functions, but can be extended with tool-specific lists. llvm-svn: 189356
* Add "CHECK-" prefix to un-break buildbot failure.Rui Ueyama2013-08-126-26/+26
| | | | | | | After r188221, the prefix given by --check-prefix must match with the label as a whole. Substring is not considered to be a correct label anymore. llvm-svn: 188227
* [tests] Update to use lit_config and lit package, as appropriate.Daniel Dunbar2013-08-092-11/+12
| | | | llvm-svn: 188116
* disable pipefail for ubsan.Rafael Espindola2013-07-261-0/+2
| | | | llvm-svn: 187273
* Fix another instance of -ccc-cxx vs. --driver-mode=g++Hans Wennborg2013-07-181-1/+1
| | | | llvm-svn: 186609
* [ASan] create separate configs for running ASan lit tests in both 32- and ↵Alexey Samsonov2013-06-071-0/+3
| | | | | | 64-bit mode. Clean up RUN-lines in tests. llvm-svn: 183498
* Remove a bunch of copy-paste: use common config for sanitizer lit/unit testsAlexey Samsonov2013-06-062-24/+3
| | | | llvm-svn: 183407
* Improve support for compiler-rt tests in CMake build.Alexey Samsonov2013-05-272-10/+12
| | | | | | | | Now compiler-rt tests run correctly if compiler-rt is checked out into arbitrary directory (not necessarily projects/compiler-rt). Patch by Greg Fitzgerald! llvm-svn: 182726
* Explicitly list all sanitizer headers in CMake build rules. Make sure ↵Alexey Samsonov2013-04-111-3/+2
| | | | | | sanitizer lit_tests depend on fresh headers. llvm-svn: 179293
* [Sanitizer] Use a common mutex to prevent mixing reports from different ↵Alexey Samsonov2013-04-051-1/+2
| | | | | | sanitizers. This fixes PR15516 llvm-svn: 178853
* compiler-rt part of r178194. Remove ubsan test for diagnostic on inf/nan ↵Richard Smith2013-03-271-4/+2
| | | | | | conversion between floating-point types. llvm-svn: 178195
* Build and install .syms files alongside sanitizer runtimes. These are used toRichard Smith2013-03-232-2/+5
| | | | | | | specify which symbols are exported to DSOs when the sanitizer is statically linked into a binary. llvm-svn: 177784
* ubsan: Pass floating-point arguments to the runtime by value if they fit theRichard Smith2013-03-222-9/+38
| | | | | | value argument. llvm-svn: 177689
* Per discussion on cxx-abi-dev, switch from comparing type_info objects toRichard Smith2013-03-211-1/+1
| | | | | | | comparing type_info names, since the latter have better uniqueness guarantees in practice. llvm-svn: 177618
OpenPOWER on IntegriCloud