[all-commits] [llvm/llvm-project] 82d29b: Add an unsigned shift base sanitizer
JF Bastien via All-commits
all-commits at lists.llvm.org
Thu Aug 27 20:06:52 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 82d29b397bb24c6a9e5c41401278886f4614e544
https://github.com/llvm/llvm-project/commit/82d29b397bb24c6a9e5c41401278886f4614e544
Author: JF Bastien <jfbastien at apple.com>
Date: 2020-08-27 (Thu, 27 Aug 2020)
Changed paths:
M clang/docs/UndefinedBehaviorSanitizer.rst
M clang/include/clang/Basic/Sanitizers.def
M clang/lib/CodeGen/CGExprScalar.cpp
M clang/lib/Driver/ToolChain.cpp
A clang/test/CodeGen/unsigned-shift-base.c
M clang/test/Driver/fsanitize.c
A compiler-rt/test/ubsan/TestCases/Integer/unsigned-shift.cpp
M llvm/docs/ReleaseNotes.rst
Log Message:
-----------
Add an unsigned shift base sanitizer
It's not undefined behavior for an unsigned left shift to overflow (i.e. to
shift bits out), but it has been the source of bugs and exploits in certain
codebases in the past. As we do in other parts of UBSan, this patch adds a
dynamic checker which acts beyond UBSan and checks other sources of errors. The
option is enabled as part of -fsanitize=integer.
The flag is named: -fsanitize=unsigned-shift-base
This matches shift-base and shift-exponent flags.
<rdar://problem/46129047>
Differential Revision: https://reviews.llvm.org/D86000
More information about the All-commits
mailing list