Disable address sanitizer.

It complains about boost/regex/v5/sub_match.hpp:57:30 and I can't figure out
what's wrong or how to ignore it.
This commit is contained in:
tastytea 2021-06-05 13:35:17 +02:00
parent fbf86f51d1
commit f1a0015f28
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
2 changed files with 5 additions and 2 deletions

View File

@ -25,7 +25,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang"
"-Wformat=2"
"-ftrapv"
"-fsanitize=undefined"
"-fsanitize=address"
# "-fsanitize=address"
"-Og"
"-fno-omit-frame-pointer")
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
@ -47,7 +47,8 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang"
list(APPEND tmp_LDFLAGS
"-fsanitize=undefined"
"-fsanitize=address")
# "-fsanitize=address"
)
# add_link_options was introduced in version 3.13.
if(${CMAKE_VERSION} VERSION_LESS 3.13)
set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${tmp_LDFLAGS}")

View File

@ -152,6 +152,8 @@ void cleanup_text(string &text)
if (boost::regex_search(text.substr(pos, endpos).data(), match,
re_pagebreak))
{
// FIXME: -fsanitize=address is complaining about this. ↓ 🤷
// Could not reproduce it.
replacement = format("<PAGE {0:s}>", match[2].str());
}
}