Skip to content

Commit

Permalink
Add -fno-sanitize-recover=all with sanitizers
Browse files Browse the repository at this point in the history
By default, UBSan just prints a message but doesn't cause an error exit.
This is not what we want for CI, so adding an extra option to make these
errors fatal in order for CI issues to be obvious.
  • Loading branch information
jbytheway committed Jan 25, 2020
1 parent cb1a791 commit 696b4ba
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,9 @@ CXXFLAGS += -ffast-math
LDFLAGS += $(PROFILE)

ifneq ($(SANITIZE),)
CXXFLAGS += -fsanitize=$(SANITIZE) -fno-sanitize-recover=all
LDFLAGS += -fsanitize=$(SANITIZE) -fno-sanitize-recover=all
SANITIZE_FLAGS := -fsanitize=$(SANITIZE) -fno-sanitize-recover=all
CXXFLAGS += $(SANITIZE_FLAGS)
LDFLAGS += $(SANITIZE_FLAGS)
endif

# enable optimizations. slow to build
Expand Down

0 comments on commit 696b4ba

Please sign in to comment.