This is an archive of the discontinued LLVM Phabricator instance.

CFI: Get check-cfi passing on Windows.
ClosedPublic

Authored by pcc on Jul 8 2015, 1:43 AM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

pcc updated this revision to Diff 29247.Jul 8 2015, 1:43 AM
pcc retitled this revision from to CFI: Get check-cfi passing on Windows..
pcc updated this object.
pcc added a reviewer: samsonov.
pcc added a subscriber: llvm-commits.
samsonov edited edge metadata.Jul 8 2015, 1:07 PM

Looks reasonable. I think it's fine to go in if you split ABI-specific code into two files.

lib/ubsan/ubsan_diag.cc
169 ↗(On Diff #29247)

Please use plain if(SANITIZER_WINDOWS) if possible.

lib/ubsan/ubsan_type_hash.cc
256 ↗(On Diff #29247)

I think we'd need to split this file into two - for Itanium and for MSVC.

samsonov accepted this revision.Jul 8 2015, 1:07 PM
samsonov edited edge metadata.
This revision is now accepted and ready to land.Jul 8 2015, 1:07 PM
This revision was automatically updated to reflect the committed changes.