summaryrefslogtreecommitdiff
path: root/lib/ubsan/ubsan_value.cc
AgeCommit message (Collapse)Author
2016-03-12Fix bad regression from r263077 when building with MSVC.Nico Weber
That change did: -#if defined(__BIG_ENDIAN__) +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ If __BYTE_ORDER__ and __ORDER_BIG_ENDIAN__ aren't defined, like they are with MSVC, this condition is true (0 == 0). Fixes PR26919. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@263324 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-09sanitizer: Fix endianness checks for gccAlexey Samsonov
Summary: __BIG_ENDIAN__ and __LITTLE_ENDIAN__ are not supported by gcc, which eg. for ubsan Value::getFloatValue will silently fall through to the little endian branch, breaking display of float values by ubsan. Use __BYTE_ORDER__ == __ORDER_BIG/LITTLE_ENDIAN__ as the condition instead, which is supported by both clang and gcc. Noticed while porting ubsan to s390x. Patch by Marcin Kościelnicki! Differential Revision: http://reviews.llvm.org/D17660 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@263077 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-11[ubsan][mips] Revise r243384 to avoid special casing big-endian mips.Daniel Sanders
Account for the case when uptr is 32-bit instead of trying to fix this case using the little endian path. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@244646 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-28[UBSan][MIPS] Fix cast-overflow tests for mips big endianSagar Thakur
This fixes the bug https://llvm.org/bugs/show_bug.cgi?id=24152 The float value resides in the first 4 bytes of ValueHandle for both mips and mipsel. Reviewers: dsanders, samsonov Subscibers: rsmith, hans, mohit.bhakkad, jaydeep, llvm-commits Differential: http://reviews.llvm.org/D11448 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@243384 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-01[PPC64]This activates UBSan for the power architecture.Bill Seurer
One test case is updated to allow for differences between power and other architectures in behavior when returning from main in certain instances http://reviews.llvm.org/D8743 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@233813 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-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
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
2012-10-14Provide a slightly more helpful diagnostic if -fcatch-undefined-behavior findsRichard Smith
a problem with __int128 arithmetic but the runtime was not built with __int128 support. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@165913 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-13Fix the bootstrap of CompilerRT with host compilers that don't supportChandler Carruth
emulating 128-bit arithmetic on 32-bit x86 targets. This should get the bootstrap back for GCC 4.6 at least. Suggestions on better ways to do the detection here are welcome... git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@165863 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-12-fcatch-undefined-behavior: Runtime library support for trapping conversions ↵Richard Smith
to or from a floating-point type where the source value is not in the range of representable values of the destination type. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@165844 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-09Add a runtime diagnostics library for Clang's -fcatch-undefined-behavior.Richard Smith
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@165533 91177308-0d34-0410-b5e6-96231b3b80d8