arsenm / sanitizers-cmake

CMake modules to help use sanitizers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FindUBSan fails with newer Clang versions when -Wextra is specified in user's CMAKE_CXX_FLAGS

smspillaz opened this issue · comments

FindUBSan fails when UndefinedBehaviourSanitizer is supported on newer clang versions because FindUBSan uses check_cxx_source_compiles and the compiler may (if the user specified -Wextra) emit a warning about deleting an object with a non-virtual destructor at compile time which is caught by -Werror.

Ideally, this particular warning should be disabled so that we can get the undefined behaviour at runtime.

@smspillaz has the issue gone with the new version of sanitizers-cmake?

@alehaa I'm not sure. I haven't been able to test this in some time. I'll be able to test it some time this week :)