2323 - [ ThreadSanitizer: Data race in the test runner] ( #threadsanitizer-data-race-in-the-test-runner )
2424- [ License] ( #license )
2525 - [ Contribution] ( #contribution )
26-
26+
2727## Intro
2828
2929As of [ nightly-2017-02-15] ( https://github.com/rust-lang/rust/pull/38699 ) ,
30- ` rustc ` ships with ** experimental** support for the following sanitizers:
30+ ` rustc ` ships with ** experimental** support for the following sanitizers:
3131
3232- [ AddressSanitizer] ( https://clang.llvm.org/docs/AddressSanitizer.html )
3333
@@ -37,7 +37,8 @@ As of [nightly-2017-02-15](https://github.com/rust-lang/rust/pull/38699),
3737
3838- [ ThreadSanitizer] ( https://clang.llvm.org/docs/ThreadSanitizer.html )
3939
40- Note that sanitizer support is ** only** available on x86_64 Linux.
40+ Note that sanitizer support is available on x86_64 Linux and on x86_64 macOS
41+ (ASan and TSan only).
4142
4243## How to use the sanitizers?
4344
@@ -61,7 +62,7 @@ compilation error if your crate depends on a dylib.
6162## Examples
6263
6364This section shows what kind of issues can be detected with the sanitizers
64- through some examples that you can find in this repository
65+ through some examples that you can find in this repository
6566
6667### AddressSanitizer
6768
@@ -239,7 +240,7 @@ fn main() {
239240
240241```
241242$ ( cd lsan && \
242- RUSTFLAGS="-Z sanitizer=leak" cargo run --target x86_64-unknown-linux-gnu --example memory-leak )
243+ RUSTFLAGS="-Z sanitizer=leak" cargo run --target x86_64-unknown-linux-gnu --example memory-leak )
243244 Running `target/x86_64-unknown-linux-gnu/debug/examples/memory-leak`
244245
245246=================================================================
@@ -451,7 +452,7 @@ index 8146e7fb1e..c013995255 100644
451452 path = "lib.rs"
452453- crate-type = ["dylib", "rlib"]
453454+ # crate-type = ["dylib", "rlib"]
454-
455+
455456 [dependencies]
456457 alloc = { path = "../liballoc" }
457458diff --git a/src/libterm/Cargo.toml b/src/libterm/Cargo.toml
@@ -474,7 +475,7 @@ index ecbd5a9c0f..553150cdd1 100644
474475 path = "lib.rs"
475476- crate-type = ["dylib", "rlib"]
476477+ # crate-type = ["dylib", "rlib"]
477-
478+
478479 [dependencies]
479480 getopts = { path = "../libgetopts" }
480481
@@ -486,7 +487,7 @@ index ecbd5a9c0f..553150cdd1 100644
486487
487488I have found that LeakSanitizer not always catches memory leaks * unless* you
488489have compiled your code with ` -C opt-level=1 ` or better. You can change the
489- optimization level of the ` dev ` profile in your ` Cargo.toml ` like this:
490+ optimization level of the ` dev ` profile in your ` Cargo.toml ` like this:
490491
491492``` toml
492493# Cargo.toml
0 commit comments