This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt] Add virtual destructor for __sanitizer::FlagHandlerBase
AbandonedPublic

Authored by dberris on Apr 10 2017, 9:19 PM.

Details

Summary

We get warnings in -Wnon-virtual-dtor builds about a class with a
non-virtual destructor on some builds. Adding the virtual destructor
silences the warning.

Event Timeline

dberris created this revision.Apr 10 2017, 9:19 PM
pcc edited edge metadata.Apr 11 2017, 2:31 PM

D31776 and D31780 are the earlier attempts to fix.

For reference the errors are coming from http://lab.llvm.org:8011/builders/sanitizer-ppc64le-linux/builds/1983/steps/build%20with%20ninja/logs/stdio

We are already adding -Wno-non-virtual-dtor to the cflags in the interception [0], asan [1] and sanitizer-common [2] tests, so maybe we need to add it in the xray tests as well?

[0] http://llvm-cs.pcc.me.uk/projects/compiler-rt/lib/interception/tests/CMakeLists.txt#22
[1] http://llvm-cs.pcc.me.uk/projects/compiler-rt/lib/asan/tests/CMakeLists.txt#34
[2] http://llvm-cs.pcc.me.uk/projects/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt#56

dberris abandoned this revision.Apr 11 2017, 6:08 PM

Good point -- at this point though the offending binary that uses this directly that was causing the issue has been deleted.

I'll add the flags in a different change. For now, since the binary that induces the warning has been removed, I'm abandoning this patch.

Thanks @pcc and @eugenis!