summaryrefslogtreecommitdiffstats
path: root/lib/AST/DeclCXX.cpp
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2017-01-30 23:38:54 +0000
committerVedant Kumar <vsk@apple.com>2017-01-30 23:38:54 +0000
commit1db5d32248527100792078cad1026ec17d3426b4 (patch)
treed7fc3e62a08e1996525414abe704cd520539da00 /lib/AST/DeclCXX.cpp
parent5bdec1f921edc253320719069d6b361c3dc0b74d (diff)
Re-apply "[ubsan] Sanity-check shift amounts before truncation"
This re-applies r293343 (reverts commit r293475) with a fix for an assertion failure caused by a missing integer cast. I tested this patch by using the built compiler to compile X86FastISel.cpp.o with ubsan. Original commit message: Ubsan does not report UB shifts in some cases where the shift exponent needs to be truncated to match the type of the shift base. We perform a range check on the truncated shift amount, leading to false negatives. Fix the issue (PR27271) by performing the range check on the original shift amount. Differential Revision: https://reviews.llvm.org/D29234 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@293572 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclCXX.cpp')
0 files changed, 0 insertions, 0 deletions