summaryrefslogtreecommitdiff
path: root/lib/ubsan
AgeCommit message (Collapse)Author
2014-05-23[ubsan] handle long double in 32-bit mode; part of the patch by Marek PolacekKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@209516 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-31[CMake] Rename add_compiler_rt_static_runtime to add_compiler_rt_runtime.Alexey Samsonov
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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@205183 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-25Enable UBSan on FreeBSD. Patch by Viktor Kutuzov.Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@202122 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-18[CMake] Add top-level target for each compiler-rt library, and add ↵Alexey Samsonov
'compiler-rt' target encompassing them all. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201556 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-14Move UBSan test suite under test/Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201401 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-14Move shared configs for lit test suites to test/ and unittests/ directoriesAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201399 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-12[UBSan] Parse common runtime flags before using a symbolizerAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201217 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-24Don't create check-ubsan and check-dfsan commands if they are not supported ↵Alexey Samsonov
on this platform git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@199979 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-18[Sanitizers] Rename Symbolizer::SymbolizeCode to Symbolizer::SymbolizePCTimur Iskhodzhanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@197569 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-09ubsan: Fix typo in 'TypeCheck/vptr.cpp' test to resolve 32bit failure.Will Dietz
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@196799 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-06Fix integer tests on platforms where uint64_t is 'unsigned long long'.Will Dietz
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@196612 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-25[UBSan] Fix warning by specifying __extension__ before __int128Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195648 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-14[UBSan] Make sure ASan and UBSan interact properly by running each test from ↵Alexey Samsonov
UBSan test suite with and without ASan git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194698 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-14[UBSan] Update UBSan location rendering to match r194686Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194687 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-25Overhaul the symbolizer interface.Peter Collingbourne
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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193448 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-20Runtime support for the indirect function call checker.Peter Collingbourne
Differential Revision: http://llvm-reviews.chandlerc.com/D1339 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193060 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-20[ubsan] Introduce %clangxx substitution for all C++ tests.Peter Collingbourne
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193059 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-17Make the big array in the UBSan C++ runtime be zero-initialized to dramaticallyRichard Smith
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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192931 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-04Refactor the usage of strip_path_prefix option and make it more consistent ↵Alexey Samsonov
across sanitizers git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191943 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-02This fixme is resolved, fix the test.Nick Lewycky
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191810 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-02Make the InvalidValueData take a SourceLocation.Nick Lewycky
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191807 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-10[Sanitizer] Refactor symbolization interface: use class instead of several ↵Alexey Samsonov
functions. Move some code around to get rid of extra source files git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190410 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-28Generate list of symbols exported from sanitizer runtimes only on 64-bit UnixAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189454 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-27Properly generate lists of exported symbols for sanitizer runtimesAlexey Samsonov
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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189356 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-12Add "CHECK-" prefix to un-break buildbot failure.Rui Ueyama
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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@188227 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-09[tests] Update to use lit_config and lit package, as appropriate.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@188116 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-26disable pipefail for ubsan.Rafael Espindola
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@187273 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-18Fix another instance of -ccc-cxx vs. --driver-mode=g++Hans Wennborg
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@186609 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-07[ASan] create separate configs for running ASan lit tests in both 32- and ↵Alexey Samsonov
64-bit mode. Clean up RUN-lines in tests. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183498 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-06Remove a bunch of copy-paste: use common config for sanitizer lit/unit testsAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@183407 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-27Improve support for compiler-rt tests in CMake build.Alexey Samsonov
Now compiler-rt tests run correctly if compiler-rt is checked out into arbitrary directory (not necessarily projects/compiler-rt). Patch by Greg Fitzgerald! git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182726 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-11Explicitly list all sanitizer headers in CMake build rules. Make sure ↵Alexey Samsonov
sanitizer lit_tests depend on fresh headers. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@179293 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-05[Sanitizer] Use a common mutex to prevent mixing reports from different ↵Alexey Samsonov
sanitizers. This fixes PR15516 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@178853 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-27compiler-rt part of r178194. Remove ubsan test for diagnostic on inf/nan ↵Richard Smith
conversion between floating-point types. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@178195 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-23Build and install .syms files alongside sanitizer runtimes. These are used toRichard Smith
specify which symbols are exported to DSOs when the sanitizer is statically linked into a binary. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177784 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-22ubsan: Pass floating-point arguments to the runtime by value if they fit theRichard Smith
value argument. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177689 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-21Per discussion on cxx-abi-dev, switch from comparing type_info objects toRichard Smith
comparing type_info names, since the latter have better uniqueness guarantees in practice. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177618 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-20Split ubsan runtime into three pieces (compiler-rt part):Richard Smith
* libclang_rt-san-* is sanitizer_common, and is linked in only if no other sanitizer runtime is present. * libclang_rt-ubsan-* is the piece of the runtime which doesn't depend on a C++ ABI library, and is always linked in. * libclang_rt-ubsan_cxx-* is the piece of the runtime which depends on a C++ ABI library, and is only linked in when linking a C++ binary. The Darwin ubsan runtime is unchanged. For more details, see Clang change r177605. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177606 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-19Update ubsan test for clang change r177362.Richard Smith
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177363 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-27[UBSan] Use common report decorator to print colorful diagnostics in UBSan, ↵Alexey Samsonov
and be more consistent w/ Printf/RawWrite git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@176182 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-23ubsan: Runtime handlers for array indexing checks.Richard Smith
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175948 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-13ubsan: Add checking for invalid downcasts. Per [expr.static.cast]p2 and p11,Richard Smith
base-to-derived casts have undefined behavior if the object is not actually an instance of the derived type. Runtime library part. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175079 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-12Highlight caret in bold green, to match Clang diagnostics.Richard Smith
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@175013 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-21CMake: add functions creating universal runtime libraries for several ↵Alexey Samsonov
architectures on OS X and use them in ASan and UBSan build rules git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173011 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-18CMake: Generalize build rules for different arches for sanitizer_common, ↵Alexey Samsonov
asan, ubsan git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172829 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-18CMake variables renaming: X86_64->x86_64 I386->i386Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172812 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-17[ubsan] Add SANITIZER_INTERFACE_ATTRIBUTE to __ubsan_vptr_type_cacheWill Dietz
Missed this one previously. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172730 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-14[ubsan] Use __sanitizer::atomic_exchange(), prefer shared impl.Will Dietz
Specify weaker memory order in case we optimize for it in the future, presently still doing same __sync_lock_test_and_set() as before. Change suggested by Alexey Samsonov, thanks! git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172429 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10UBSan: use %p not 0x%zx when printing pointers.Richard Smith
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172129 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-10[ubsan] Move attribute specifier to fix build with gcc.Will Dietz
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172078 91177308-0d34-0410-b5e6-96231b3b80d8