Skip to content

Commit 0decdac

Browse files
committedMar 2, 2024
Auto merge of #121914 - Nadrieril:rollup-ol98ncg, r=Nadrieril
Rollup of 5 pull requests Successful merges: - #120761 (Add initial support for DataFlowSanitizer) - #121622 (Preserve same vtable pointer when cloning raw waker, to fix Waker::will_wake) - #121716 (match lowering: Lower bindings in a predictable order) - #121731 (Now that inlining, mir validation and const eval all use reveal-all, we won't be constraining hidden types here anymore) - #121841 (`f16` and `f128` step 2: intrinsics) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 5119208 + 4c65eef commit 0decdac

File tree

52 files changed

+1156
-144
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1156
-144
lines changed
 

‎compiler/rustc_ast/src/ast.rs

+6
Original file line numberDiff line numberDiff line change
@@ -1920,22 +1920,28 @@ pub struct FnSig {
19201920
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
19211921
#[derive(Encodable, Decodable, HashStable_Generic)]
19221922
pub enum FloatTy {
1923+
F16,
19231924
F32,
19241925
F64,
1926+
F128,
19251927
}
19261928

19271929
impl FloatTy {
19281930
pub fn name_str(self) -> &'static str {
19291931
match self {
1932+
FloatTy::F16 => "f16",
19301933
FloatTy::F32 => "f32",
19311934
FloatTy::F64 => "f64",
1935+
FloatTy::F128 => "f128",
19321936
}
19331937
}
19341938

19351939
pub fn name(self) -> Symbol {
19361940
match self {
1941+
FloatTy::F16 => sym::f16,
19371942
FloatTy::F32 => sym::f32,
19381943
FloatTy::F64 => sym::f64,
1944+
FloatTy::F128 => sym::f128,
19391945
}
19401946
}
19411947
}

‎compiler/rustc_codegen_llvm/src/back/write.rs

+10
Original file line numberDiff line numberDiff line change
@@ -519,12 +519,22 @@ pub(crate) unsafe fn llvm_optimize(
519519
let pgo_sample_use_path = get_pgo_sample_use_path(config);
520520
let is_lto = opt_stage == llvm::OptStage::ThinLTO || opt_stage == llvm::OptStage::FatLTO;
521521
let instr_profile_output_path = get_instr_profile_output_path(config);
522+
let sanitize_dataflow_abilist: Vec<_> = config
523+
.sanitizer_dataflow_abilist
524+
.iter()
525+
.map(|file| CString::new(file.as_str()).unwrap())
526+
.collect();
527+
let sanitize_dataflow_abilist_ptrs: Vec<_> =
528+
sanitize_dataflow_abilist.iter().map(|file| file.as_ptr()).collect();
522529
// Sanitizer instrumentation is only inserted during the pre-link optimization stage.
523530
let sanitizer_options = if !is_lto {
524531
Some(llvm::SanitizerOptions {
525532
sanitize_address: config.sanitizer.contains(SanitizerSet::ADDRESS),
526533
sanitize_address_recover: config.sanitizer_recover.contains(SanitizerSet::ADDRESS),
527534
sanitize_cfi: config.sanitizer.contains(SanitizerSet::CFI),
535+
sanitize_dataflow: config.sanitizer.contains(SanitizerSet::DATAFLOW),
536+
sanitize_dataflow_abilist: sanitize_dataflow_abilist_ptrs.as_ptr(),
537+
sanitize_dataflow_abilist_len: sanitize_dataflow_abilist_ptrs.len(),
528538
sanitize_kcfi: config.sanitizer.contains(SanitizerSet::KCFI),
529539
sanitize_memory: config.sanitizer.contains(SanitizerSet::MEMORY),
530540
sanitize_memory_recover: config.sanitizer_recover.contains(SanitizerSet::MEMORY),

0 commit comments

Comments
 (0)
Please sign in to comment.