diff options
author | Vedant Kumar <vsk@apple.com> | 2017-08-02 18:10:31 +0000 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2017-08-02 18:10:31 +0000 |
commit | a0c3671b204564ac0c746e22312828643e8d4b11 (patch) | |
tree | 31fb0892ff56cddc4bdd1bad76435815bcaca495 /clang/docs/UndefinedBehaviorSanitizer.rst | |
parent | 1f9ab16c4e0634d85098d41f83cd949fcf616dac (diff) | |
download | llvm-a0c3671b204564ac0c746e22312828643e8d4b11.zip llvm-a0c3671b204564ac0c746e22312828643e8d4b11.tar.gz llvm-a0c3671b204564ac0c746e22312828643e8d4b11.tar.bz2 |
[ubsan] Have -fsanitize=vptr emit a null check if -fsanitize=null isn't available
In r309007, I made -fsanitize=null a hard prerequisite for -fsanitize=vptr. I
did not see the need for the two checks to have separate null checking logic
for the same pointer. I expected the two checks to either always be enabled
together, or to be mutually compatible.
In the mailing list discussion re: r309007 it became clear that that isn't the
case. If a codebase is -fsanitize=vptr clean but not -fsanitize=null clean,
it's useful to have -fsanitize=vptr emit its own null check. That's what this
patch does: with it, -fsanitize=vptr can be used without -fsanitize=null.
Differential Revision: https://reviews.llvm.org/D36112
llvm-svn: 309846
Diffstat (limited to 'clang/docs/UndefinedBehaviorSanitizer.rst')
-rw-r--r-- | clang/docs/UndefinedBehaviorSanitizer.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/docs/UndefinedBehaviorSanitizer.rst b/clang/docs/UndefinedBehaviorSanitizer.rst index 6274054..aa52f2d 100644 --- a/clang/docs/UndefinedBehaviorSanitizer.rst +++ b/clang/docs/UndefinedBehaviorSanitizer.rst @@ -132,10 +132,10 @@ Available checks are: - ``-fsanitize=vla-bound``: A variable-length array whose bound does not evaluate to a positive value. - ``-fsanitize=vptr``: Use of an object whose vptr indicates that it is of - the wrong dynamic type, or that its lifetime has not begun or has ended. - Incompatible with ``-fno-rtti`` and ``-fno-sanitize=null``. Link must be - performed by ``clang++``, not ``clang``, to make sure C++-specific parts of - the runtime library and C++ standard libraries are present. + the wrong dynamic type, or that its lifetime has not begun or has ended. + Incompatible with ``-fno-rtti``. Link must be performed by ``clang++``, not + ``clang``, to make sure C++-specific parts of the runtime library and C++ + standard libraries are present. You can also use the following check groups: - ``-fsanitize=undefined``: All of the checks listed above other than |