Auto merge of #94134 - matthiaskrgr:rollup-b132kjz, r=matthiaskrgr
Rollup of 10 pull requests Successful merges: - #89892 (Suggest `impl Trait` return type when incorrectly using a generic return type) - #91675 (Add MemTagSanitizer Support) - #92806 (Add more information to `impl Trait` error) - #93497 (Pass `--test` flag through rustdoc to rustc so `#[test]` functions can be scraped) - #93814 (mips64-openwrt-linux-musl: correct soft-foat) - #93847 (kmc-solid: Use the filesystem thread-safety wrapper) - #93877 (asm: Allow the use of r8-r14 as clobbers on Thumb1) - #93892 (Only mark projection as ambiguous if GAT substs are constrained) - #93915 (Implement --check-cfg option (RFC 3013), take 2) - #93953 (Add the `known-bug` test directive, use it, and do some cleanup) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
1882597991
127 changed files with 1593 additions and 577 deletions
|
@ -55,6 +55,19 @@ pub fn sanitize<'ll>(cx: &CodegenCx<'ll, '_>, no_sanitize: SanitizerSet, llfn: &
|
|||
if enabled.contains(SanitizerSet::HWADDRESS) {
|
||||
llvm::Attribute::SanitizeHWAddress.apply_llfn(Function, llfn);
|
||||
}
|
||||
if enabled.contains(SanitizerSet::MEMTAG) {
|
||||
// Check to make sure the mte target feature is actually enabled.
|
||||
let sess = cx.tcx.sess;
|
||||
let features = llvm_util::llvm_global_features(sess).join(",");
|
||||
let mte_feature_enabled = features.rfind("+mte");
|
||||
let mte_feature_disabled = features.rfind("-mte");
|
||||
|
||||
if mte_feature_enabled.is_none() || (mte_feature_disabled > mte_feature_enabled) {
|
||||
sess.err("`-Zsanitizer=memtag` requires `-Ctarget-feature=+mte`");
|
||||
}
|
||||
|
||||
llvm::Attribute::SanitizeMemTag.apply_llfn(Function, llfn);
|
||||
}
|
||||
}
|
||||
|
||||
/// Tell LLVM to emit or not emit the information necessary to unwind the stack for the function.
|
||||
|
|
|
@ -190,6 +190,7 @@ pub enum Attribute {
|
|||
StackProtectStrong = 31,
|
||||
StackProtect = 32,
|
||||
NoUndef = 33,
|
||||
SanitizeMemTag = 34,
|
||||
}
|
||||
|
||||
/// LLVMIntPredicate
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue