Sanitizers support#466
Conversation
mark-i-m
left a comment
There was a problem hiding this comment.
Thanks!
One minor nit, if you have time
src/sanitizers.md
Outdated
| ==10029==ABORTING | ||
| ``` | ||
|
|
||
| Use of uninitialized memory detected by MemorySanitizer. Note that we are using |
There was a problem hiding this comment.
Perhaps make the title a markdown heading or bolded or something?
There was a problem hiding this comment.
Added an introductory paragraph to examples and additional headings.
|
I would probably wait for mentioned PR in rustc to get merged first. While |
nikomatsakis
left a comment
There was a problem hiding this comment.
This is awesome! That said, I wonder if this documentation would be better placed in the rustc book, which can be found (I think) in src/doc/rustc. What I would expect to include here in the rustc-guide are a few details on how it is implemented. Basically trying to convey the high-level strategy that is implemented in this commit.
|
I extended "How are sanitizers implemented in rustc?" section, and removed everything else. |
|
It looks like CI is failing |
nikomatsakis
left a comment
There was a problem hiding this comment.
Wow this is so great, thank you thank you. =)
src/sanitizers.md
Outdated
|
|
||
| To enable a sanitizer compile with `-Zsanitizer=...` option, where value is one | ||
| of `address`, `leak`, `memory` or `thread`. For more details how to use | ||
| sanitizers please refer to rustc book. |
There was a problem hiding this comment.
For some reason I can't make suggestions on this repo, but this should be
please refer to [the unstable book](https://doc.rust-lang.org/unstable-book/).
src/sanitizers.md
Outdated
|
|
||
| The implementation of sanitizers relies entirely on LLVM. It consists of | ||
| compile time instrumentation passes and runtime libraries. The role rustc plays | ||
| in the implementation is limited to the execution of following steps: |
There was a problem hiding this comment.
Nit: executon of the following steps
src/sanitizers.md
Outdated
| compile time instrumentation passes and runtime libraries. The role rustc plays | ||
| in the implementation is limited to the execution of following steps: | ||
|
|
||
| 1. The sanitizer runtime libraries are part of [compiler-rt] project, and [will |
There was a problem hiding this comment.
Nit: the compiler-rt project
|
Thanks. I applied the suggestions. |
Documentation for existing sanitizers support in rustc, as well as changes proposed in rust-lang/rust#65241.