Skip to content

Commit

Permalink
test: Enable more sanitizers in ubsan tests.
Browse files Browse the repository at this point in the history
cmp does a lot of work with integers and some with floats, so it's good
to have checks for undefined behaviour on those data types.
  • Loading branch information
iphydf committed Apr 5, 2024
1 parent e836703 commit 70603e5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,13 @@ jobs:
run: make -j4
- name: Build test programs
run: make testprogs
- name: Run tests
run: make test
- name: Run unit tests
run: make unittest
- name: Run ASAN tests
run: make addrtest
- name: Run MSAN tests
run: make memtest
- name: Run UBSAN tests
run: make ubtest
- name: Run tests without FPU (no float)
run: make nofloattest
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ NOFPUTESTCFLAGS ?= $(TESTCFLAGS) -DCMP_NO_FLOAT
ADDRCFLAGS ?= -fsanitize=address
MEMCFLAGS ?= -fsanitize=memory -fno-omit-frame-pointer \
-fno-optimize-sibling-calls
UBCFLAGS ?= -fsanitize=undefined
UBCFLAGS ?= -fsanitize=undefined,nullability,local-bounds,float-divide-by-zero,integer

.PHONY: all clean test coverage

Expand Down

0 comments on commit 70603e5

Please sign in to comment.