[PATCH] D35735: [ubsan] Null-check pointers in -fsanitize=vptr (PR33881)

2017-07-25 Thread Vedant Kumar via Phabricator via cfe-commits
vsk marked an inline comment as done. vsk added a comment. I made the suggested test changes and updated the release notes: r309007 Repository: rL LLVM https://reviews.llvm.org/D35735 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http:/

[PATCH] D35735: [ubsan] Null-check pointers in -fsanitize=vptr (PR33881)

2017-07-25 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL309007: [ubsan] Null-check pointers in -fsanitize=vptr (PR33881) (authored by vedantk). Changed prior to commit: https://reviews.llvm.org/D35735?vs=107741&id=108133#toc Repository: rL LLVM https://r

[PATCH] D35735: [ubsan] Null-check pointers in -fsanitize=vptr (PR33881)

2017-07-24 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. You might also want to mention the fact that `-fsanitizer=vptr` requires `null` in the release notes. https://reviews.llvm.org/D35735 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/ma

[PATCH] D35735: [ubsan] Null-check pointers in -fsanitize=vptr (PR33881)

2017-07-24 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. LGTM! Comment at: test/CodeGenCXX/ubsan-devirtualized-calls.cpp:67 static_cast(badp)->f1(); //< No devirt, test 'badp isa Base1'. + // We were able to skip the null c

[PATCH] D35735: [ubsan] Null-check pointers in -fsanitize=vptr (PR33881)

2017-07-21 Thread Vedant Kumar via Phabricator via cfe-commits
vsk updated this revision to Diff 107741. vsk marked an inline comment as done. vsk added a comment. - Drop 'REQUIRES: asserts'. https://reviews.llvm.org/D35735 Files: docs/UndefinedBehaviorSanitizer.rst include/clang/Basic/DiagnosticDriverKinds.td include/clang/Basic/DiagnosticGroups.td

[PATCH] D35735: [ubsan] Null-check pointers in -fsanitize=vptr (PR33881)

2017-07-21 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added inline comments. Comment at: test/CodeGenCXX/ubsan-devirtualized-calls.cpp:1 -// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -emit-llvm -fsanitize=vptr %s -o - | FileCheck %s +// REQUIRES: asserts +// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_tripl

[PATCH] D35735: [ubsan] Null-check pointers in -fsanitize=vptr (PR33881)

2017-07-21 Thread Vedant Kumar via Phabricator via cfe-commits
vsk created this revision. The instrumentation generated by -fsanitize=vptr does not null check a user pointer before loading from it. This causes crashes in the face of UB member calls (this=nullptr), i.e it causes user programs to crash only after UBSan is turned on. The fix is to make run-time