summaryrefslogtreecommitdiff
path: root/lib/ubsan/ubsan_type_hash.cc
AgeCommit message (Collapse)Author
2015-07-08CFI: Get check-cfi passing on Windows.Peter Collingbourne
Specifically: - Start using %expect_crash. - Provide an implementation of __ubsan::getDynamicTypeInfoFromVtable for the Microsoft C++ ABI. This is all that is needed for CFI diagnostics; UBSan's -fsanitize=vptr also requires an implementation of __ubsan::checkDynamicType. - Build the sanitizer runtimes against the release version of the C runtime, even in debug builds. - Accommodate demangling differences in tests. Differential Revision: http://reviews.llvm.org/D11029 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@241745 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-19Add control flow integrity diagnosis function to UBSan runtime library.Peter Collingbourne
Also includes execution tests for the feature. Differential Revision: http://reviews.llvm.org/D10269 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@240111 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-11Use 'override/final' instead of 'virtual' for overridden methodsAlexander Kornienko
The patch is generated using clang-tidy misc-use-override check. This command was used: tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py \ -checks='-*,misc-use-override' -header-filter='llvm|clang' -j=32 -fix \ -format git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@234680 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-26[UBSan] Explicitly list all supported OS/arch pairs supported by UBSan.Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@233295 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-30Revert "UBSan: Teach isDerivedFromAtOffset and findBaseAtOffset about vbases"Alexey Samsonov
This reverts commit r221445. This change leads to false positives reports from -fsanitize=vptr. See original commit thread for more details. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@224972 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-06UBSan: Teach isDerivedFromAtOffset and findBaseAtOffset about vbasesDavid Majnemer
When the __virtual_mask is set, __offset_flags >> __offset_shift yields an offset into the vtable. Dereferencing this vtable slot gets us the vbase offset. Adjust a test case to verify that this, in fact, works. Differential Revision: http://reviews.llvm.org/D6074 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@221445 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-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
2012-12-18ubsan: Demangle class names, and be more informative when a reinterpret_castRichard Smith
has got us to the wrong offset within an object. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170423 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-18ubsan: When diagnosing something wrong somewhere in memory, emit a noteRichard Smith
pointing at the bad location and a snippet of nearby memory values. This is strictly best-effort; reading these bytes to display the note could lead to a seg fault, and that's explicitly OK. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170415 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-29Consistently declare 'extern "C"' variable in namespace __ubsan. No ↵Richard Smith
functionality change. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@166966 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-29Don't define an extern "C" variable in its first declaration, to appease aRichard Smith
bogus gcc warning. Take this opportunity to move the declaration to the header, since it's part of the API of this file. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@166965 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25-fcatch-undefined-behavior checking for appropriate vptr value: library side.Richard Smith
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@166660 91177308-0d34-0410-b5e6-96231b3b80d8