forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build/test the sanitizers only when --enable-sanitizers is used
- Loading branch information
Jorge Aparicio
committed
Feb 8, 2017
1 parent
9af6aa3
commit 775a936
Showing
11 changed files
with
21 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,11 @@ | ||
-include ../tools.mk | ||
|
||
# NOTE the address sanitizer only supports x86_64 linux | ||
ifndef IS_WINDOWS | ||
ifeq ($(shell uname),Linux) | ||
ifeq ($(shell uname -m),x86_64) | ||
ifdef SANITIZER_SUPPORT | ||
all: | ||
$(RUSTC) -g -Z sanitizer=address -Z print-link-args overflow.rs | grep -q librustc_asan | ||
$(TMPDIR)/overflow 2>&1 | grep -q stack-buffer-overflow | ||
else | ||
all: | ||
|
||
endif | ||
else | ||
all: | ||
|
||
endif | ||
else | ||
all: | ||
|
||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,10 @@ | ||
-include ../tools.mk | ||
|
||
# NOTE the leak sanitizer only supports x86_64 linux | ||
# Also, this particular sanitizer sometimes doesn't work so we are not going to | ||
# run the binary | ||
ifndef IS_WINDOWS | ||
ifeq ($(shell uname),Linux) | ||
ifeq ($(shell uname -m),x86_64) | ||
ifdef SANITIZER_SUPPORT | ||
all: | ||
$(RUSTC) -C opt-level=1 -g -Z sanitizer=leak -Z print-link-args leak.rs | grep -q librustc_lsan | ||
$(TMPDIR)/leak 2>&1 | grep -q 'detected memory leaks' | ||
else | ||
all: | ||
|
||
endif | ||
else | ||
all: | ||
|
||
endif | ||
else | ||
all: | ||
|
||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,10 @@ | ||
-include ../tools.mk | ||
|
||
# NOTE the memory sanitizer only supports x86_64 linux | ||
ifndef IS_WINDOWS | ||
ifeq ($(shell uname),Linux) | ||
ifeq ($(shell uname -m),x86_64) | ||
ifdef SANITIZER_SUPPORT | ||
all: | ||
$(RUSTC) -g -Z sanitizer=memory -Z print-link-args uninit.rs | grep -q librustc_msan | ||
$(TMPDIR)/uninit 2>&1 | grep -q use-of-uninitialized-value | ||
else | ||
all: | ||
|
||
endif | ||
else | ||
all: | ||
|
||
endif | ||
else | ||
all: | ||
|
||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,10 @@ | ||
-include ../tools.mk | ||
|
||
# NOTE the leak sanitizer only supports x86_64 linux | ||
ifndef IS_WINDOWS | ||
ifeq ($(shell uname),Linux) | ||
ifeq ($(shell uname -m),x86_64) | ||
ifdef SANITIZER_SUPPORT | ||
all: | ||
$(RUSTC) -g -Z sanitizer=thread -Z print-link-args racy.rs | grep -q librustc_tsan | ||
$(TMPDIR)/racy 2>&1 | grep -q 'data race' | ||
else | ||
all: | ||
|
||
endif | ||
else | ||
all: | ||
|
||
endif | ||
else | ||
all: | ||
|
||
endif |