Enable UBSan in addition to ASan

UBSan is a useful tool, so we enable it for `--enable-sanitizer` in
addition to ASan.
This commit is contained in:
Christoph M. Becker 2019-12-31 11:46:04 +01:00
parent 4130fe437a
commit ea3afcbae3
2 changed files with 2 additions and 2 deletions

View file

@ -327,7 +327,7 @@ if (CLANG_TOOLSET) {
"-Wno-unused-command-line-argument -Wno-unused-function -Wno-ignored-pragma-optimize");
}
ARG_ENABLE("sanitizer", "Enable address sanitizer extension", "no");
ARG_ENABLE("sanitizer", "Enable ASan and UBSan extensions", "no");
if (PHP_SANITIZER == "yes") {
if (COMPILER_NUMERIC_VERSION < 500) {
ERROR("Clang at least 5.0.0 required for sanitation plugins");

View file

@ -3706,7 +3706,7 @@ function add_asan_opts(cflags_name, libs_name, ldflags_name)
}
if (!!cflags_name) {
ADD_FLAG(cflags_name, "-fsanitize=address");
ADD_FLAG(cflags_name, "-fsanitize=address,undefined");
}
if (!!libs_name) {
if (X64) {