Skip to content

Commit

Permalink
sudo sysctl vm.mmap_rnd_bits=28 for ASAN testing
Browse files Browse the repository at this point in the history
  • Loading branch information
mirostauder committed Mar 12, 2024
1 parent 434166e commit b0ef600
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/tap/tap/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ STDCPP := -std=c++$(shell echo $(CPLUSPLUS) | cut -c3-4) -DCXX$(shell echo $(CPL
WASAN :=
ifeq ($(WITHASAN),1)
WASAN := -fsanitize=address
# workaroud ASAN limitation ASLR > 28bits
# https://github.com/google/sanitizers/issues/1716
DUMMY := $(shell sudo sysctl vm.mmap_rnd_bits=28)
endif

OPT := $(STDCPP) -O2 -ggdb -Wl,--no-as-needed $(WASAN)
Expand Down
3 changes: 3 additions & 0 deletions test/tap/tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@ endif
WASAN :=
ifeq ($(WITHASAN),1)
WASAN := -fsanitize=address -DTEST_WITHASAN
# workaroud ASAN limitation ASLR > 28bits
# https://github.com/google/sanitizers/issues/1716
DUMMY := $(shell sudo sysctl vm.mmap_rnd_bits=28)
endif

OPT := $(STDCPP) -O2 -ggdb -Wl,--no-as-needed -Wl,-rpath,$(TAP_LDIR) $(WGCOV) $(WASAN) -DGITVERSION=\"$(GIT_VERSION)\"
Expand Down
3 changes: 3 additions & 0 deletions test/tap/tests_with_deps/deprecate_eof_support/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ endif
WASAN :=
ifeq ($(WITHASAN),1)
WASAN := -fsanitize=address
# workaroud ASAN limitation ASLR > 28bits
# https://github.com/google/sanitizers/issues/1716
DUMMY := $(shell sudo sysctl vm.mmap_rnd_bits=28)
endif

OPT := $(STDCPP) -O2 -ggdb -Wl,--no-as-needed -Wl,-rpath,"../../tap" $(WGCOV) $(WASAN)
Expand Down

0 comments on commit b0ef600

Please sign in to comment.