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.
This commit is contained in:
parent
f9a2a7d19e
commit
1a9c3f66db
@ -18,6 +18,7 @@ env:
|
|||||||
- DEFINES=PUGIXML_NO_EXCEPTIONS
|
- DEFINES=PUGIXML_NO_EXCEPTIONS
|
||||||
script:
|
script:
|
||||||
- make test cxxstd=c++11 defines=$DEFINES config=coverage -j2
|
- 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++11 defines=$DEFINES config=release -j2
|
||||||
- make test cxxstd=c++98 defines=$DEFINES config=debug -j2
|
- make test cxxstd=c++98 defines=$DEFINES config=debug -j2
|
||||||
|
|
||||||
|
|||||||
2
Makefile
2
Makefile
@ -27,7 +27,7 @@ ifeq ($(config),coverage)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(config),sanitize)
|
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
|
LDFLAGS+=-fsanitize=address,undefined
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user