[UBSan] Add the ability to dump call stacks to -fsanitize=vptr
authorAlexey Samsonov <vonosmas@gmail.com>
Wed, 23 Jul 2014 18:44:54 +0000 (18:44 +0000)
committerAlexey Samsonov <vonosmas@gmail.com>
Wed, 23 Jul 2014 18:44:54 +0000 (18:44 +0000)
commitbfa711c8b0bca16641fe60329a7ce12726de5f1f
tree23fa6e340ad3baffa4c825b0b8f4bbcfcff9b465
parentcd875aa55147ad40f95aab2fe089c498e23ad403
[UBSan] Add the ability to dump call stacks to -fsanitize=vptr

This change introduces the first UBSan-specific runtime flag: print_stacktrace
(off by default). It can be set in UBSAN_OPTIONS to unwind and print call stacks
in addition to diagnostic messages. For now these stacks are printed only
in vptr checker.

This change is based on http://reviews.llvm.org/D4410 by Byoungyoung Lee!

llvm-svn: 213783
compiler-rt/lib/ubsan/CMakeLists.txt
compiler-rt/lib/ubsan/ubsan_diag.cc
compiler-rt/lib/ubsan/ubsan_diag.h
compiler-rt/lib/ubsan/ubsan_flags.cc [new file with mode: 0644]
compiler-rt/lib/ubsan/ubsan_flags.h [new file with mode: 0644]
compiler-rt/lib/ubsan/ubsan_handlers_cxx.cc
compiler-rt/test/ubsan/TestCases/TypeCheck/vptr.cpp