Disable alignment sanitizer in undefined behaviour sanitizer
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
673bd58b88
commit
3739b0bb66
|
@ -228,9 +228,14 @@ if (PKMNLIB_TESTS)
|
|||
# Add a definition for the test library
|
||||
target_compile_definitions(pkmnLibTests PRIVATE TESTS_BUILD)
|
||||
if (SANITIZER_TESTS AND NOT WINDOWS)
|
||||
target_compile_options(pkmnLib PRIVATE -fsanitize=address,undefined,leak,integer,nullability -fno-sanitize-recover=all -fno-sanitize=unsigned-integer-overflow)
|
||||
target_compile_options(pkmnLibTests PRIVATE -fsanitize=address,undefined,leak,integer,nullability -fno-sanitize-recover=all)
|
||||
target_link_options(pkmnLibTests PRIVATE -fsanitize=address,undefined,leak,integer,nullability -fno-sanitize-recover=all)
|
||||
# Turn on a set of standard sanitizers
|
||||
# We don't want to recover from any sanitizer error
|
||||
# Except unsigned overflows (often used in standard libraries etc)
|
||||
# Except alignment (Angelscript aligns data wrong when allocating, and I don't have the time to fix Angelscripts allocation.)
|
||||
SET(SANITIZER_OPTS -fsanitize=address,undefined,leak,integer,nullability -fno-sanitize-recover=all -fno-sanitize=unsigned-integer-overflow -fsanitize-recover=alignment)
|
||||
target_compile_options(pkmnLib PRIVATE ${SANITIZER_OPTS})
|
||||
target_compile_options(pkmnLibTests PRIVATE ${SANITIZER_OPTS})
|
||||
target_link_options(pkmnLibTests PRIVATE ${SANITIZER_OPTS})
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "ConstString.hpp"
|
||||
#include <Arbutils/StringView.hpp>
|
||||
#include <Arbutils/Ensure.hpp>
|
||||
#include <Arbutils/StringView.hpp>
|
||||
|
||||
static void ConstructConstString(void* self) { new (self) ArbUt::StringView(); }
|
||||
static void ConstructConstStringFromStd(void* self, const std::string& s) {
|
||||
|
|
Loading…
Reference in New Issue