Skip to content
Snippets Groups Projects
Commit 1a9c3f66 authored by Arseny Kapoulkine's avatar Arseny Kapoulkine
Browse files

Enable config=sanitize in Travis CI

This commit changes sanitize configuration to fail on the first error
and ignore floating-point division and overflow "errors" that trigger
when we test the corresponding functionality. This makes it possible to
run this on all commits - if new UB or memory safety issues are introduced,
asan/ubsan will catch them.
parent f9a2a7d1
No related branches found
No related tags found
No related merge requests found
......@@ -18,6 +18,7 @@ env:
- DEFINES=PUGIXML_NO_EXCEPTIONS
script:
- make test cxxstd=c++11 defines=$DEFINES config=coverage -j2
- if [[ "$CXX" == "clang++" ]]; then make test cxxstd=c++11 defines=$DEFINES config=sanitize -j2; fi
- make test cxxstd=c++11 defines=$DEFINES config=release -j2
- make test cxxstd=c++98 defines=$DEFINES config=debug -j2
......
......@@ -27,7 +27,7 @@ ifeq ($(config),coverage)
endif
ifeq ($(config),sanitize)
CXXFLAGS+=-fsanitize=address,undefined
CXXFLAGS+=-fsanitize=address,undefined -fno-sanitize=float-divide-by-zero,float-cast-overflow -fno-sanitize-recover=all
LDFLAGS+=-fsanitize=address,undefined
endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment