Uh oh!
There was an error while loading. Please reload this page.
Add MemTagSanitizer Support - #91675
Conversation
rust-highfive
commented
Dec 8, 2021
r? @davidtwco (rust-highfive has picked a reviewer for you, use r? to override) |
rust-highfive
commented
Dec 8, 2021
|
This comment has been minimized.
This comment has been minimized.
Uh oh!
There was an error while loading. Please reload this page.
77bd3d1 to
9b15ee4Compareivanloz
commented
Dec 9, 2021
Added a basic test which checks that the attribute is being emitted as expected. |
davidtwco
left a comment
There was a problem hiding this comment.
This looks reasonable to me but it's not an area that I'm familiar with.
davidtwco
commented
Dec 13, 2021
r? @nagisa |
tmiasko
commented
Dec 13, 2021
Could we diagnose the attempt to use the sanitizer without mte target feature? This seems like the first issue one would generally encounter when trying to use the sanitizer. FWIW the implementation looks good to me. |
ivanloz
commented
Dec 14, 2021
Tested passing the sanitizer without the mte target feature, and LLVM throws out a pretty difficult to understand error. So I've gone ahead and added a check such that rustc errors out if the sanitizer is used without the target feature and emits a useful error message indicating the mte target feature is required. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
JohnCSimon
commented
Jan 23, 2022
Ping from triage: |
ivanloz
commented
Jan 24, 2022
Apologies and thanks for your patience, this has been on my radar. I expect to have time to address the comments this week. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
nagisa
commented
Feb 11, 2022
r=me with or without the nit fixed. |
bors
commented
Feb 13, 2022
☔ The latest upstream changes (presumably #93670) made this pull request unmergeable. Please resolve the merge conflicts. |
ivanloz
commented
Feb 15, 2022
Merge conflicts should be resolved now. |
nagisa
commented
Feb 15, 2022
@bors r+ |
bors
commented
Feb 15, 2022
📌 Commit da23682322ec6183f6968068ac2a99565c60abd8 has been approved by |
bors
commented
Feb 16, 2022
⌛ Testing commit da23682322ec6183f6968068ac2a99565c60abd8 with merge a08fcc4c75532ca5b4a508d561c9fe753e31333d... |
bors
commented
Feb 16, 2022
💔 Test failed - checks-actions |
This comment has been minimized.
This comment has been minimized.
Adds support for the LLVM MemTagSanitizer.
ivanloz
commented
Feb 16, 2022
I removed the quotes from the test's 'target-features' arg -- seems like that may have been causing the testing infrastructure to fail. |
nagisa
commented
Feb 16, 2022
@bors r+ |
bors
commented
Feb 16, 2022
📌 Commit 568aeda has been approved by |
…askrgr Rollup of 10 pull requests Successful merges: - rust-lang#89892 (Suggest `impl Trait` return type when incorrectly using a generic return type) - rust-lang#91675 (Add MemTagSanitizer Support) - rust-lang#92806 (Add more information to `impl Trait` error) - rust-lang#93497 (Pass `--test` flag through rustdoc to rustc so `#[test]` functions can be scraped) - rust-lang#93814 (mips64-openwrt-linux-musl: correct soft-foat) - rust-lang#93847 (kmc-solid: Use the filesystem thread-safety wrapper) - rust-lang#93877 (asm: Allow the use of r8-r14 as clobbers on Thumb1) - rust-lang#93892 (Only mark projection as ambiguous if GAT substs are constrained) - rust-lang#93915 (Implement --check-cfg option (RFC 3013), take 2) - rust-lang#93953 (Add the `known-bug` test directive, use it, and do some cleanup) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Add support for the LLVM MemTagSanitizer.
On hardware which supports it (see caveats below), the MemTagSanitizer can catch bugs similar to AddressSanitizer and HardwareAddressSanitizer, but with lower overhead.
On a tag mismatch, a SIGSEGV is signaled with code SEGV_MTESERR / SEGV_MTEAERR.
Usage
-Zsanitizer=memtag -C target-feature="+mte"Comments/Caveats
-C target-feature="+mte"TODO