summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/ubsan-vtable-checks.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Set dso_local on runtime variables.Rafael Espindola2018-03-211-1/+3
| | | | llvm-svn: 328068
* [MS] Don't escape MS C++ names with \01Reid Kleckner2018-03-161-3/+3
| | | | | | | It is not needed after LLVM r327734. Now it will be easier to copy-paste IR symbol names from Clang. llvm-svn: 327738
* Bring r325915 back.Rafael Espindola2018-02-231-3/+3
| | | | | | | | | | | | | | | The tests that failed on a windows host have been fixed. Original message: Start setting dso_local for COFF. With this there are still some GVs where we don't set dso_local because setGVProperties is never called. I intend to fix that in followup commits. This is just the bare minimum to teach shouldAssumeDSOLocal what it should do for COFF. llvm-svn: 325940
* Revert "Start setting dso_local for COFF."Rafael Espindola2018-02-231-3/+3
| | | | | | | | This reverts commit r325915. It will take some time to fix the failures on a windows host. llvm-svn: 325929
* Start setting dso_local for COFF.Rafael Espindola2018-02-231-3/+3
| | | | | | | | | With this there are still some GVs where we don't set dso_local because setGVProperties is never called. I intend to fix that in followup commits. This is just the bare minimum to teach shouldAssumeDSOLocal what it should do for COFF. llvm-svn: 325915
* -fsanitize=vptr warnings on bad static types in dynamic_cast and typeidStephan Bergmann2017-12-281-0/+12
| | | | | | | | | | ...when such an operation is done on an object during con-/destruction. This is the cfe part of a patch covering both cfe and compiler-rt. Differential Revision: https://reviews.llvm.org/D40295 llvm-svn: 321519
* [ubsan] Null-check pointers in -fsanitize=vptr (PR33881)Vedant Kumar2017-07-251-2/+2
| | | | | | | | | | | | | | | | | | | 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's causing user programs to crash only after UBSan is turned on. The fix is to make run-time null checking a prerequisite for enabling -fsanitize=vptr, and to then teach UBSan to reuse these run-time null checks to make -fsanitize=vptr safe. Testing: check-clang, check-ubsan, a stage2 ubsan-enabled build Differential Revision: https://reviews.llvm.org/D35735 https://bugs.llvm.org/show_bug.cgi?id=33881 llvm-svn: 309007
* [ubsan] Minimize size of data for type_mismatch (Redo of D19667)Filipe Cabecinhas2017-01-061-1/+1
| | | | | | | | | | | | | | | | | | Summary: This patch makes the type_mismatch static data 7 bytes smaller (and it ends up being 16 bytes smaller due to alignment restrictions, at least on some x86-64 environments). It revs up the type_mismatch handler version since we're breaking binary compatibility. I will soon post a patch for the compiler-rt side. Reviewers: rsmith, kcc, vitalybuka, pgousseau, gbedwell Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28242 llvm-svn: 291236
* Explicitly specify that ubsan-vtable-checks is x86-64.Ivan Krasin2016-11-171-2/+2
| | | | | | This should fix a failure on PowerPC introduced by r287181. llvm-svn: 287185
* Insert a type check before reading vtable.Ivan Krasin2016-11-171-0/+40
Summary: this is to prevent a situation when a pointer is invalid or null, but we get to reading from vtable before we can check that (possibly causing a segfault without a good diagnostics). Reviewers: pcc Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26559 llvm-svn: 287181
OpenPOWER on IntegriCloud