-
Notifications
You must be signed in to change notification settings - Fork 520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sanitizers support #466
Sanitizers support #466
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps make the title a markdown heading or bolded or something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added an introductory paragraph to examples and additional headings.
I would probably wait for mentioned PR in rustc to get merged first. While |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
It looks like CI is failing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: the compiler-rt project
Thanks. I applied the suggestions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Documentation for existing sanitizers support in rustc, as well as changes proposed in rust-lang/rust#65241.