This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 7 files changed +31
-12
lines changed
compiler/rustc_target/src/spec/targets
src/tools/compiletest/src Expand file tree Collapse file tree 7 files changed +31
-12
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ pub fn target() -> Target {
1919 stack_probes : StackProbeType :: Inline ,
2020 supported_sanitizers : SanitizerSet :: ADDRESS
2121 | SanitizerSet :: CFI
22+ | SanitizerSet :: KCFI
2223 | SanitizerSet :: LEAK
2324 | SanitizerSet :: MEMORY
2425 | SanitizerSet :: MEMTAG
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ pub fn target() -> Target {
1010 base. static_position_independent_executables = true ;
1111 base. supported_sanitizers = SanitizerSet :: ADDRESS
1212 | SanitizerSet :: CFI
13+ | SanitizerSet :: KCFI
1314 | SanitizerSet :: DATAFLOW
1415 | SanitizerSet :: LEAK
1516 | SanitizerSet :: MEMORY
Original file line number Diff line number Diff line change @@ -827,6 +827,7 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
827827 "needs-sanitizer-cfi" ,
828828 "needs-sanitizer-dataflow" ,
829829 "needs-sanitizer-hwaddress" ,
830+ "needs-sanitizer-kcfi" ,
830831 "needs-sanitizer-leak" ,
831832 "needs-sanitizer-memory" ,
832833 "needs-sanitizer-memtag" ,
Original file line number Diff line number Diff line change 55//
66// This checks that the reified function pointer will have the expected alias set at its call-site.
77
8- //@ needs-sanitizer- cfi
8+ //@ revisions: cfi kcfi
99// FIXME(#122848) Remove only-linux once OSX CFI binaries work
1010//@ only-linux
11- //@ compile-flags: --crate-type=bin -Cprefer-dynamic=off -Clto -Zsanitizer=cfi
12- //@ compile-flags: -C target-feature=-crt-static -C codegen-units=1 -C opt-level=0
11+ //@ [cfi] needs-sanitizer-cfi
12+ //@ [kcfi] needs-sanitizer-kcfi
13+ //@ compile-flags: -C target-feature=-crt-static
14+ //@ [cfi] compile-flags: -C codegen-units=1 -C lto -C prefer-dynamic=off -C opt-level=0
15+ //@ [cfi] compile-flags: -Z sanitizer=cfi
16+ //@ [kcfi] compile-flags: -Z sanitizer=kcfi
1317//@ run-pass
1418
1519pub fn main ( ) {
Original file line number Diff line number Diff line change 22// * Arc<dyn Foo> as for custom receivers
33// * &dyn Bar<T=Baz> for type constraints
44
5- //@ needs-sanitizer- cfi
5+ //@ revisions: cfi kcfi
66// FIXME(#122848) Remove only-linux once OSX CFI binaries work
77//@ only-linux
8- //@ compile-flags: --crate-type=bin -Cprefer-dynamic=off -Clto -Zsanitizer=cfi
9- //@ compile-flags: -C target-feature=-crt-static -C codegen-units=1 -C opt-level=0
8+ //@ [cfi] needs-sanitizer-cfi
9+ //@ [kcfi] needs-sanitizer-kcfi
10+ //@ compile-flags: -C target-feature=-crt-static
11+ //@ [cfi] compile-flags: -C codegen-units=1 -C lto -C prefer-dynamic=off -C opt-level=0
12+ //@ [cfi] compile-flags: -Z sanitizer=cfi
13+ //@ [kcfi] compile-flags: -Z sanitizer=kcfi
1014//@ run-pass
1115
1216use std:: sync:: Arc ;
Original file line number Diff line number Diff line change 11// Check that encoding self-referential types works with #[repr(transparent)]
22
3- //@ needs-sanitizer- cfi
3+ //@ revisions: cfi kcfi
44// FIXME(#122848) Remove only-linux once OSX CFI binaries work
55//@ only-linux
6- //@ compile-flags: --crate-type=bin -Cprefer-dynamic=off -Clto -Zsanitizer=cfi
7- //@ compile-flags: -C target-feature=-crt-static -C codegen-units=1 -C opt-level=0
6+ //@ [cfi] needs-sanitizer-cfi
7+ //@ [kcfi] needs-sanitizer-kcfi
8+ //@ compile-flags: -C target-feature=-crt-static
9+ //@ [cfi] compile-flags: -C codegen-units=1 -C lto -C prefer-dynamic=off -C opt-level=0
10+ //@ [cfi] compile-flags: -Z sanitizer=cfi
11+ //@ [kcfi] compile-flags: -Z sanitizer=kcfi
812//@ run-pass
913
1014use std:: marker:: PhantomData ;
Original file line number Diff line number Diff line change 11// Tests that calling a trait object method on a trait object with additional auto traits works.
22
3- //@ needs-sanitizer- cfi
3+ //@ revisions: cfi kcfi
44// FIXME(#122848) Remove only-linux once OSX CFI binaries work
55//@ only-linux
6- //@ compile-flags: --crate-type=bin -Cprefer-dynamic=off -Clto -Zsanitizer=cfi
7- //@ compile-flags: -C target-feature=-crt-static -C codegen-units=1 -C opt-level=0
6+ //@ [cfi] needs-sanitizer-cfi
7+ //@ [kcfi] needs-sanitizer-kcfi
8+ //@ compile-flags: -C target-feature=-crt-static
9+ //@ [cfi] compile-flags: -C codegen-units=1 -C lto -C prefer-dynamic=off -C opt-level=0
10+ //@ [cfi] compile-flags: -Z sanitizer=cfi
11+ //@ [kcfi] compile-flags: -Z sanitizer=kcfi
812//@ run-pass
913
1014trait Foo {
You can’t perform that action at this time.
0 commit comments