diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2015-07-08 22:10:34 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2015-07-08 22:10:34 +0000 |
commit | 521a01f23da66078ef562b2d06b06cb3e55209ff (patch) | |
tree | 7055a7b9ee253e990f62c047792f6833c891e92d /lib/ubsan/ubsan_diag.cc | |
parent | d3b30c45fa5b39f4df21de34d703906dba573df8 (diff) | |
download | compiler-rt-521a01f23da66078ef562b2d06b06cb3e55209ff.tar.gz |
CFI: Get check-cfi passing on Windows.
Specifically:
- Start using %expect_crash.
- Provide an implementation of __ubsan::getDynamicTypeInfoFromVtable
for the Microsoft C++ ABI. This is all that is needed for CFI
diagnostics; UBSan's -fsanitize=vptr also requires an implementation of
__ubsan::checkDynamicType.
- Build the sanitizer runtimes against the release version of the C
runtime, even in debug builds.
- Accommodate demangling differences in tests.
Differential Revision: http://reviews.llvm.org/D11029
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@241745 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ubsan/ubsan_diag.cc')
-rw-r--r-- | lib/ubsan/ubsan_diag.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/ubsan/ubsan_diag.cc b/lib/ubsan/ubsan_diag.cc index b14412217..3d5042b51 100644 --- a/lib/ubsan/ubsan_diag.cc +++ b/lib/ubsan/ubsan_diag.cc @@ -165,8 +165,12 @@ static void renderText(const char *Message, const Diag::Arg *Args) { case Diag::AK_String: Printf("%s", A.String); break; - case Diag::AK_Mangled: { - Printf("'%s'", Symbolizer::GetOrInit()->Demangle(A.String)); + case Diag::AK_TypeName: { + if (SANITIZER_WINDOWS) + // The Windows implementation demangles names early. + Printf("'%s'", A.String); + else + Printf("'%s'", Symbolizer::GetOrInit()->Demangle(A.String)); break; } case Diag::AK_SInt: |