mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-21 17:52:12 +03:00
use -Z deny-partial-mitigations instead of -Z allow-partial-mitigations=!
This commit is contained in:
@@ -694,6 +694,9 @@ pub fn instrument_coverage(&self) -> InstrumentCoverage {
|
||||
// Sometimes different options need to build a common structure.
|
||||
// That structure can be kept in one of the options' fields, the others become dummy.
|
||||
macro_rules! redirect_field {
|
||||
($cg:ident.deny_partial_mitigations) => {
|
||||
$cg.allow_partial_mitigations
|
||||
};
|
||||
($cg:ident.link_arg) => {
|
||||
$cg.link_args
|
||||
};
|
||||
@@ -894,6 +897,8 @@ mod desc {
|
||||
pub(crate) const parse_assert_incr_state: &str = "one of: `loaded`, `not-loaded`";
|
||||
pub(crate) const parse_allow_partial_mitigations: &str =
|
||||
super::enforcable_mitigations::DeniedPartialMitigationKind::KINDS;
|
||||
pub(crate) const parse_deny_partial_mitigations: &str =
|
||||
super::enforcable_mitigations::DeniedPartialMitigationKind::KINDS;
|
||||
}
|
||||
|
||||
pub mod parse {
|
||||
@@ -2080,15 +2085,14 @@ pub(crate) fn parse_assert_incr_state(
|
||||
true
|
||||
}
|
||||
|
||||
pub(crate) fn parse_allow_partial_mitigations(
|
||||
fn parse_partial_mitigations(
|
||||
slot: &mut Vec<MitigationEnablement>,
|
||||
v: Option<&str>,
|
||||
enabled: bool,
|
||||
) -> bool {
|
||||
match v {
|
||||
Some(s) => {
|
||||
for sub in s.split(',') {
|
||||
let (sub, enabled) =
|
||||
if sub.starts_with('!') { (&sub[1..], false) } else { (sub, true) };
|
||||
match sub.parse() {
|
||||
Ok(kind) => slot.push(MitigationEnablement { kind, enabled }),
|
||||
Err(_) => return false,
|
||||
@@ -2099,6 +2103,20 @@ pub(crate) fn parse_allow_partial_mitigations(
|
||||
None => false,
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn parse_allow_partial_mitigations(
|
||||
slot: &mut Vec<MitigationEnablement>,
|
||||
v: Option<&str>,
|
||||
) -> bool {
|
||||
parse_partial_mitigations(slot, v, true)
|
||||
}
|
||||
|
||||
pub(crate) fn parse_deny_partial_mitigations(
|
||||
slot: &mut Vec<MitigationEnablement>,
|
||||
v: Option<&str>,
|
||||
) -> bool {
|
||||
parse_partial_mitigations(slot, v, false)
|
||||
}
|
||||
}
|
||||
|
||||
options! {
|
||||
@@ -2332,6 +2350,8 @@ pub(crate) fn parse_allow_partial_mitigations(
|
||||
"deduplicate identical diagnostics (default: yes)"),
|
||||
default_visibility: Option<SymbolVisibility> = (None, parse_opt_symbol_visibility, [TRACKED],
|
||||
"overrides the `default_visibility` setting of the target"),
|
||||
deny_partial_mitigations: Vec<MitigationEnablement> = (Vec::new(), parse_deny_partial_mitigations, [UNTRACKED],
|
||||
"Deny mitigations not enabled for all dependency crates (comma separated list)"),
|
||||
dep_info_omit_d_target: bool = (false, parse_bool, [TRACKED],
|
||||
"in dep-info output, omit targets for tracking dependencies of the dep-info files \
|
||||
themselves (default: no)"),
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
//@ ignore-nvptx64 stack protector is not supported
|
||||
//@ ignore-wasm32-unknown-unknown stack protector is not supported
|
||||
//@ edition: 2024
|
||||
//@ compile-flags: -Z allow-partial-mitigations=!control-flow-guard -C control-flow-guard=on
|
||||
//@ compile-flags: -Z deny-partial-mitigations=control-flow-guard -C control-flow-guard=on
|
||||
|
||||
// check that in edition 2024, it is still possible to explicitly
|
||||
// disallow partial mitigations (in edition=future, they are
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: your program uses the crate `std`, that is not compiled with `stack-protector=all` enabled
|
||||
--> $DIR/err-allow-partial-mitigations.rs:13:1
|
||||
--> $DIR/err-allow-partial-mitigations.rs:14:1
|
||||
|
|
||||
LL | fn main() {}
|
||||
| ^
|
||||
@@ -8,7 +8,7 @@ LL | fn main() {}
|
||||
= help: it is possible to disable `-Z allow-partial-mitigations=stack-protector` via `-Z deny-partial-mitigations=stack-protector`
|
||||
|
||||
error: your program uses the crate `std`, that is not compiled with `control-flow-guard` enabled
|
||||
--> $DIR/err-allow-partial-mitigations.rs:13:1
|
||||
--> $DIR/err-allow-partial-mitigations.rs:14:1
|
||||
|
|
||||
LL | fn main() {}
|
||||
| ^
|
||||
@@ -17,7 +17,7 @@ LL | fn main() {}
|
||||
= help: it is possible to disable `-Z allow-partial-mitigations=control-flow-guard` via `-Z deny-partial-mitigations=control-flow-guard`
|
||||
|
||||
error: your program uses the crate `core`, that is not compiled with `stack-protector=all` enabled
|
||||
--> $DIR/err-allow-partial-mitigations.rs:13:1
|
||||
--> $DIR/err-allow-partial-mitigations.rs:14:1
|
||||
|
|
||||
LL | fn main() {}
|
||||
| ^
|
||||
@@ -26,7 +26,7 @@ LL | fn main() {}
|
||||
= help: it is possible to disable `-Z allow-partial-mitigations=stack-protector` via `-Z deny-partial-mitigations=stack-protector`
|
||||
|
||||
error: your program uses the crate `core`, that is not compiled with `control-flow-guard` enabled
|
||||
--> $DIR/err-allow-partial-mitigations.rs:13:1
|
||||
--> $DIR/err-allow-partial-mitigations.rs:14:1
|
||||
|
|
||||
LL | fn main() {}
|
||||
| ^
|
||||
@@ -35,7 +35,7 @@ LL | fn main() {}
|
||||
= help: it is possible to disable `-Z allow-partial-mitigations=control-flow-guard` via `-Z deny-partial-mitigations=control-flow-guard`
|
||||
|
||||
error: your program uses the crate `alloc`, that is not compiled with `stack-protector=all` enabled
|
||||
--> $DIR/err-allow-partial-mitigations.rs:13:1
|
||||
--> $DIR/err-allow-partial-mitigations.rs:14:1
|
||||
|
|
||||
LL | fn main() {}
|
||||
| ^
|
||||
@@ -44,7 +44,7 @@ LL | fn main() {}
|
||||
= help: it is possible to disable `-Z allow-partial-mitigations=stack-protector` via `-Z deny-partial-mitigations=stack-protector`
|
||||
|
||||
error: your program uses the crate `alloc`, that is not compiled with `control-flow-guard` enabled
|
||||
--> $DIR/err-allow-partial-mitigations.rs:13:1
|
||||
--> $DIR/err-allow-partial-mitigations.rs:14:1
|
||||
|
|
||||
LL | fn main() {}
|
||||
| ^
|
||||
@@ -53,7 +53,7 @@ LL | fn main() {}
|
||||
= help: it is possible to disable `-Z allow-partial-mitigations=control-flow-guard` via `-Z deny-partial-mitigations=control-flow-guard`
|
||||
|
||||
error: your program uses the crate `compiler_builtins`, that is not compiled with `stack-protector=all` enabled
|
||||
--> $DIR/err-allow-partial-mitigations.rs:13:1
|
||||
--> $DIR/err-allow-partial-mitigations.rs:14:1
|
||||
|
|
||||
LL | fn main() {}
|
||||
| ^
|
||||
@@ -62,7 +62,7 @@ LL | fn main() {}
|
||||
= help: it is possible to disable `-Z allow-partial-mitigations=stack-protector` via `-Z deny-partial-mitigations=stack-protector`
|
||||
|
||||
error: your program uses the crate `compiler_builtins`, that is not compiled with `control-flow-guard` enabled
|
||||
--> $DIR/err-allow-partial-mitigations.rs:13:1
|
||||
--> $DIR/err-allow-partial-mitigations.rs:14:1
|
||||
|
|
||||
LL | fn main() {}
|
||||
| ^
|
||||
@@ -71,7 +71,7 @@ LL | fn main() {}
|
||||
= help: it is possible to disable `-Z allow-partial-mitigations=control-flow-guard` via `-Z deny-partial-mitigations=control-flow-guard`
|
||||
|
||||
error: your program uses the crate `libc`, that is not compiled with `stack-protector=all` enabled
|
||||
--> $DIR/err-allow-partial-mitigations.rs:13:1
|
||||
--> $DIR/err-allow-partial-mitigations.rs:14:1
|
||||
|
|
||||
LL | fn main() {}
|
||||
| ^
|
||||
@@ -80,7 +80,7 @@ LL | fn main() {}
|
||||
= help: it is possible to disable `-Z allow-partial-mitigations=stack-protector` via `-Z deny-partial-mitigations=stack-protector`
|
||||
|
||||
error: your program uses the crate `libc`, that is not compiled with `control-flow-guard` enabled
|
||||
--> $DIR/err-allow-partial-mitigations.rs:13:1
|
||||
--> $DIR/err-allow-partial-mitigations.rs:14:1
|
||||
|
|
||||
LL | fn main() {}
|
||||
| ^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: your program uses the crate `std`, that is not compiled with `stack-protector=all` enabled
|
||||
--> $DIR/err-allow-partial-mitigations.rs:13:1
|
||||
--> $DIR/err-allow-partial-mitigations.rs:14:1
|
||||
|
|
||||
LL | fn main() {}
|
||||
| ^
|
||||
@@ -8,7 +8,7 @@ LL | fn main() {}
|
||||
= help: it is possible to disable `-Z allow-partial-mitigations=stack-protector` via `-Z deny-partial-mitigations=stack-protector`
|
||||
|
||||
error: your program uses the crate `core`, that is not compiled with `stack-protector=all` enabled
|
||||
--> $DIR/err-allow-partial-mitigations.rs:13:1
|
||||
--> $DIR/err-allow-partial-mitigations.rs:14:1
|
||||
|
|
||||
LL | fn main() {}
|
||||
| ^
|
||||
@@ -17,7 +17,7 @@ LL | fn main() {}
|
||||
= help: it is possible to disable `-Z allow-partial-mitigations=stack-protector` via `-Z deny-partial-mitigations=stack-protector`
|
||||
|
||||
error: your program uses the crate `alloc`, that is not compiled with `stack-protector=all` enabled
|
||||
--> $DIR/err-allow-partial-mitigations.rs:13:1
|
||||
--> $DIR/err-allow-partial-mitigations.rs:14:1
|
||||
|
|
||||
LL | fn main() {}
|
||||
| ^
|
||||
@@ -26,7 +26,7 @@ LL | fn main() {}
|
||||
= help: it is possible to disable `-Z allow-partial-mitigations=stack-protector` via `-Z deny-partial-mitigations=stack-protector`
|
||||
|
||||
error: your program uses the crate `compiler_builtins`, that is not compiled with `stack-protector=all` enabled
|
||||
--> $DIR/err-allow-partial-mitigations.rs:13:1
|
||||
--> $DIR/err-allow-partial-mitigations.rs:14:1
|
||||
|
|
||||
LL | fn main() {}
|
||||
| ^
|
||||
@@ -35,7 +35,7 @@ LL | fn main() {}
|
||||
= help: it is possible to disable `-Z allow-partial-mitigations=stack-protector` via `-Z deny-partial-mitigations=stack-protector`
|
||||
|
||||
error: your program uses the crate `libc`, that is not compiled with `stack-protector=all` enabled
|
||||
--> $DIR/err-allow-partial-mitigations.rs:13:1
|
||||
--> $DIR/err-allow-partial-mitigations.rs:14:1
|
||||
|
|
||||
LL | fn main() {}
|
||||
| ^
|
||||
|
||||
+5
-5
@@ -1,5 +1,5 @@
|
||||
error: your program uses the crate `std`, that is not compiled with `stack-protector=all` enabled
|
||||
--> $DIR/err-allow-partial-mitigations.rs:13:1
|
||||
--> $DIR/err-allow-partial-mitigations.rs:14:1
|
||||
|
|
||||
LL | fn main() {}
|
||||
| ^
|
||||
@@ -8,7 +8,7 @@ LL | fn main() {}
|
||||
= help: it is possible to disable `-Z allow-partial-mitigations=stack-protector` via `-Z deny-partial-mitigations=stack-protector`
|
||||
|
||||
error: your program uses the crate `core`, that is not compiled with `stack-protector=all` enabled
|
||||
--> $DIR/err-allow-partial-mitigations.rs:13:1
|
||||
--> $DIR/err-allow-partial-mitigations.rs:14:1
|
||||
|
|
||||
LL | fn main() {}
|
||||
| ^
|
||||
@@ -17,7 +17,7 @@ LL | fn main() {}
|
||||
= help: it is possible to disable `-Z allow-partial-mitigations=stack-protector` via `-Z deny-partial-mitigations=stack-protector`
|
||||
|
||||
error: your program uses the crate `alloc`, that is not compiled with `stack-protector=all` enabled
|
||||
--> $DIR/err-allow-partial-mitigations.rs:13:1
|
||||
--> $DIR/err-allow-partial-mitigations.rs:14:1
|
||||
|
|
||||
LL | fn main() {}
|
||||
| ^
|
||||
@@ -26,7 +26,7 @@ LL | fn main() {}
|
||||
= help: it is possible to disable `-Z allow-partial-mitigations=stack-protector` via `-Z deny-partial-mitigations=stack-protector`
|
||||
|
||||
error: your program uses the crate `compiler_builtins`, that is not compiled with `stack-protector=all` enabled
|
||||
--> $DIR/err-allow-partial-mitigations.rs:13:1
|
||||
--> $DIR/err-allow-partial-mitigations.rs:14:1
|
||||
|
|
||||
LL | fn main() {}
|
||||
| ^
|
||||
@@ -35,7 +35,7 @@ LL | fn main() {}
|
||||
= help: it is possible to disable `-Z allow-partial-mitigations=stack-protector` via `-Z deny-partial-mitigations=stack-protector`
|
||||
|
||||
error: your program uses the crate `libc`, that is not compiled with `stack-protector=all` enabled
|
||||
--> $DIR/err-allow-partial-mitigations.rs:13:1
|
||||
--> $DIR/err-allow-partial-mitigations.rs:14:1
|
||||
|
|
||||
LL | fn main() {}
|
||||
| ^
|
||||
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
error: your program uses the crate `std`, that is not compiled with `stack-protector=all` enabled
|
||||
--> $DIR/err-allow-partial-mitigations.rs:14:1
|
||||
|
|
||||
LL | fn main() {}
|
||||
| ^
|
||||
|
|
||||
= note: recompile `std` with `stack-protector=all` enabled, or use `-Z allow-partial-mitigations=stack-protector` to allow creating an artifact that has the mitigation only partially enabled
|
||||
= help: it is possible to disable `-Z allow-partial-mitigations=stack-protector` via `-Z deny-partial-mitigations=stack-protector`
|
||||
|
||||
error: your program uses the crate `std`, that is not compiled with `control-flow-guard` enabled
|
||||
--> $DIR/err-allow-partial-mitigations.rs:14:1
|
||||
|
|
||||
LL | fn main() {}
|
||||
| ^
|
||||
|
|
||||
= note: recompile `std` with `control-flow-guard` enabled, or use `-Z allow-partial-mitigations=control-flow-guard` to allow creating an artifact that has the mitigation only partially enabled
|
||||
= help: it is possible to disable `-Z allow-partial-mitigations=control-flow-guard` via `-Z deny-partial-mitigations=control-flow-guard`
|
||||
|
||||
error: your program uses the crate `core`, that is not compiled with `stack-protector=all` enabled
|
||||
--> $DIR/err-allow-partial-mitigations.rs:14:1
|
||||
|
|
||||
LL | fn main() {}
|
||||
| ^
|
||||
|
|
||||
= note: recompile `core` with `stack-protector=all` enabled, or use `-Z allow-partial-mitigations=stack-protector` to allow creating an artifact that has the mitigation only partially enabled
|
||||
= help: it is possible to disable `-Z allow-partial-mitigations=stack-protector` via `-Z deny-partial-mitigations=stack-protector`
|
||||
|
||||
error: your program uses the crate `core`, that is not compiled with `control-flow-guard` enabled
|
||||
--> $DIR/err-allow-partial-mitigations.rs:14:1
|
||||
|
|
||||
LL | fn main() {}
|
||||
| ^
|
||||
|
|
||||
= note: recompile `core` with `control-flow-guard` enabled, or use `-Z allow-partial-mitigations=control-flow-guard` to allow creating an artifact that has the mitigation only partially enabled
|
||||
= help: it is possible to disable `-Z allow-partial-mitigations=control-flow-guard` via `-Z deny-partial-mitigations=control-flow-guard`
|
||||
|
||||
error: your program uses the crate `alloc`, that is not compiled with `stack-protector=all` enabled
|
||||
--> $DIR/err-allow-partial-mitigations.rs:14:1
|
||||
|
|
||||
LL | fn main() {}
|
||||
| ^
|
||||
|
|
||||
= note: recompile `alloc` with `stack-protector=all` enabled, or use `-Z allow-partial-mitigations=stack-protector` to allow creating an artifact that has the mitigation only partially enabled
|
||||
= help: it is possible to disable `-Z allow-partial-mitigations=stack-protector` via `-Z deny-partial-mitigations=stack-protector`
|
||||
|
||||
error: your program uses the crate `alloc`, that is not compiled with `control-flow-guard` enabled
|
||||
--> $DIR/err-allow-partial-mitigations.rs:14:1
|
||||
|
|
||||
LL | fn main() {}
|
||||
| ^
|
||||
|
|
||||
= note: recompile `alloc` with `control-flow-guard` enabled, or use `-Z allow-partial-mitigations=control-flow-guard` to allow creating an artifact that has the mitigation only partially enabled
|
||||
= help: it is possible to disable `-Z allow-partial-mitigations=control-flow-guard` via `-Z deny-partial-mitigations=control-flow-guard`
|
||||
|
||||
error: your program uses the crate `compiler_builtins`, that is not compiled with `stack-protector=all` enabled
|
||||
--> $DIR/err-allow-partial-mitigations.rs:14:1
|
||||
|
|
||||
LL | fn main() {}
|
||||
| ^
|
||||
|
|
||||
= note: recompile `compiler_builtins` with `stack-protector=all` enabled, or use `-Z allow-partial-mitigations=stack-protector` to allow creating an artifact that has the mitigation only partially enabled
|
||||
= help: it is possible to disable `-Z allow-partial-mitigations=stack-protector` via `-Z deny-partial-mitigations=stack-protector`
|
||||
|
||||
error: your program uses the crate `compiler_builtins`, that is not compiled with `control-flow-guard` enabled
|
||||
--> $DIR/err-allow-partial-mitigations.rs:14:1
|
||||
|
|
||||
LL | fn main() {}
|
||||
| ^
|
||||
|
|
||||
= note: recompile `compiler_builtins` with `control-flow-guard` enabled, or use `-Z allow-partial-mitigations=control-flow-guard` to allow creating an artifact that has the mitigation only partially enabled
|
||||
= help: it is possible to disable `-Z allow-partial-mitigations=control-flow-guard` via `-Z deny-partial-mitigations=control-flow-guard`
|
||||
|
||||
error: your program uses the crate `libc`, that is not compiled with `stack-protector=all` enabled
|
||||
--> $DIR/err-allow-partial-mitigations.rs:14:1
|
||||
|
|
||||
LL | fn main() {}
|
||||
| ^
|
||||
|
|
||||
= note: recompile `libc` with `stack-protector=all` enabled, or use `-Z allow-partial-mitigations=stack-protector` to allow creating an artifact that has the mitigation only partially enabled
|
||||
= help: it is possible to disable `-Z allow-partial-mitigations=stack-protector` via `-Z deny-partial-mitigations=stack-protector`
|
||||
|
||||
error: your program uses the crate `libc`, that is not compiled with `control-flow-guard` enabled
|
||||
--> $DIR/err-allow-partial-mitigations.rs:14:1
|
||||
|
|
||||
LL | fn main() {}
|
||||
| ^
|
||||
|
|
||||
= note: recompile `libc` with `control-flow-guard` enabled, or use `-Z allow-partial-mitigations=control-flow-guard` to allow creating an artifact that has the mitigation only partially enabled
|
||||
= help: it is possible to disable `-Z allow-partial-mitigations=control-flow-guard` via `-Z deny-partial-mitigations=control-flow-guard`
|
||||
|
||||
error: aborting due to 10 previous errors
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
// ignore-tidy-linelength
|
||||
//@ revisions: sp both disable enable-disable wrong-enable
|
||||
//@ revisions: sp both disable enable-disable wrong-enable enable-separately-disable-together
|
||||
//@ check-fail
|
||||
//@ ignore-nvptx64 stack protector is not supported
|
||||
//@ ignore-wasm32-unknown-unknown stack protector is not supported
|
||||
//@ edition:future
|
||||
//@ [both] compile-flags: -Z unstable-options -C control-flow-guard=on -Z stack-protector=all
|
||||
//@ [sp] compile-flags: -Z unstable-options -Z stack-protector=all
|
||||
//@ [disable] compile-flags: -Z unstable-options -Z allow-partial-mitigations=!stack-protector -Z stack-protector=all
|
||||
//@ [enable-disable] compile-flags: -Z unstable-options -Z allow-partial-mitigations=stack-protector -Z allow-partial-mitigations=!stack-protector -Z stack-protector=all
|
||||
//@ [disable] compile-flags: -Z unstable-options -Z deny-partial-mitigations=stack-protector -Z stack-protector=all
|
||||
//@ [enable-disable] compile-flags: -Z unstable-options -Z allow-partial-mitigations=stack-protector -Z deny-partial-mitigations=stack-protector -Z stack-protector=all
|
||||
//@ [wrong-enable] compile-flags: -Z unstable-options -Z allow-partial-mitigations=control-flow-guard -Z stack-protector=all
|
||||
//@ [enable-separately-disable-together] compile-flags: -Z unstable-options -Z allow-partial-mitigations=stack-protector -Z allow-partial-mitigations=control-flow-guard -Z deny-partial-mitigations=control-flow-guard,stack-protector -C control-flow-guard=on -Z stack-protector=all
|
||||
|
||||
fn main() {}
|
||||
//[both]~^ ERROR that is not compiled with
|
||||
@@ -41,3 +42,13 @@ fn main() {}
|
||||
//[wrong-enable]~| ERROR that is not compiled with
|
||||
//[wrong-enable]~| ERROR that is not compiled with
|
||||
//[wrong-enable]~| ERROR that is not compiled with
|
||||
//[enable-separately-disable-together]~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ERROR that is not compiled with
|
||||
//[enable-separately-disable-together]~| ERROR that is not compiled with
|
||||
//[enable-separately-disable-together]~| ERROR that is not compiled with
|
||||
//[enable-separately-disable-together]~| ERROR that is not compiled with
|
||||
//[enable-separately-disable-together]~| ERROR that is not compiled with
|
||||
//[enable-separately-disable-together]~| ERROR that is not compiled with
|
||||
//[enable-separately-disable-together]~| ERROR that is not compiled with
|
||||
//[enable-separately-disable-together]~| ERROR that is not compiled with
|
||||
//[enable-separately-disable-together]~| ERROR that is not compiled with
|
||||
//[enable-separately-disable-together]~| ERROR that is not compiled with
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: your program uses the crate `std`, that is not compiled with `stack-protector=all` enabled
|
||||
--> $DIR/err-allow-partial-mitigations.rs:13:1
|
||||
--> $DIR/err-allow-partial-mitigations.rs:14:1
|
||||
|
|
||||
LL | fn main() {}
|
||||
| ^
|
||||
@@ -8,7 +8,7 @@ LL | fn main() {}
|
||||
= help: it is possible to disable `-Z allow-partial-mitigations=stack-protector` via `-Z deny-partial-mitigations=stack-protector`
|
||||
|
||||
error: your program uses the crate `core`, that is not compiled with `stack-protector=all` enabled
|
||||
--> $DIR/err-allow-partial-mitigations.rs:13:1
|
||||
--> $DIR/err-allow-partial-mitigations.rs:14:1
|
||||
|
|
||||
LL | fn main() {}
|
||||
| ^
|
||||
@@ -17,7 +17,7 @@ LL | fn main() {}
|
||||
= help: it is possible to disable `-Z allow-partial-mitigations=stack-protector` via `-Z deny-partial-mitigations=stack-protector`
|
||||
|
||||
error: your program uses the crate `alloc`, that is not compiled with `stack-protector=all` enabled
|
||||
--> $DIR/err-allow-partial-mitigations.rs:13:1
|
||||
--> $DIR/err-allow-partial-mitigations.rs:14:1
|
||||
|
|
||||
LL | fn main() {}
|
||||
| ^
|
||||
@@ -26,7 +26,7 @@ LL | fn main() {}
|
||||
= help: it is possible to disable `-Z allow-partial-mitigations=stack-protector` via `-Z deny-partial-mitigations=stack-protector`
|
||||
|
||||
error: your program uses the crate `compiler_builtins`, that is not compiled with `stack-protector=all` enabled
|
||||
--> $DIR/err-allow-partial-mitigations.rs:13:1
|
||||
--> $DIR/err-allow-partial-mitigations.rs:14:1
|
||||
|
|
||||
LL | fn main() {}
|
||||
| ^
|
||||
@@ -35,7 +35,7 @@ LL | fn main() {}
|
||||
= help: it is possible to disable `-Z allow-partial-mitigations=stack-protector` via `-Z deny-partial-mitigations=stack-protector`
|
||||
|
||||
error: your program uses the crate `libc`, that is not compiled with `stack-protector=all` enabled
|
||||
--> $DIR/err-allow-partial-mitigations.rs:13:1
|
||||
--> $DIR/err-allow-partial-mitigations.rs:14:1
|
||||
|
|
||||
LL | fn main() {}
|
||||
| ^
|
||||
|
||||
+5
-5
@@ -1,5 +1,5 @@
|
||||
error: your program uses the crate `std`, that is not compiled with `stack-protector=all` enabled
|
||||
--> $DIR/err-allow-partial-mitigations.rs:13:1
|
||||
--> $DIR/err-allow-partial-mitigations.rs:14:1
|
||||
|
|
||||
LL | fn main() {}
|
||||
| ^
|
||||
@@ -8,7 +8,7 @@ LL | fn main() {}
|
||||
= help: it is possible to disable `-Z allow-partial-mitigations=stack-protector` via `-Z deny-partial-mitigations=stack-protector`
|
||||
|
||||
error: your program uses the crate `core`, that is not compiled with `stack-protector=all` enabled
|
||||
--> $DIR/err-allow-partial-mitigations.rs:13:1
|
||||
--> $DIR/err-allow-partial-mitigations.rs:14:1
|
||||
|
|
||||
LL | fn main() {}
|
||||
| ^
|
||||
@@ -17,7 +17,7 @@ LL | fn main() {}
|
||||
= help: it is possible to disable `-Z allow-partial-mitigations=stack-protector` via `-Z deny-partial-mitigations=stack-protector`
|
||||
|
||||
error: your program uses the crate `alloc`, that is not compiled with `stack-protector=all` enabled
|
||||
--> $DIR/err-allow-partial-mitigations.rs:13:1
|
||||
--> $DIR/err-allow-partial-mitigations.rs:14:1
|
||||
|
|
||||
LL | fn main() {}
|
||||
| ^
|
||||
@@ -26,7 +26,7 @@ LL | fn main() {}
|
||||
= help: it is possible to disable `-Z allow-partial-mitigations=stack-protector` via `-Z deny-partial-mitigations=stack-protector`
|
||||
|
||||
error: your program uses the crate `compiler_builtins`, that is not compiled with `stack-protector=all` enabled
|
||||
--> $DIR/err-allow-partial-mitigations.rs:13:1
|
||||
--> $DIR/err-allow-partial-mitigations.rs:14:1
|
||||
|
|
||||
LL | fn main() {}
|
||||
| ^
|
||||
@@ -35,7 +35,7 @@ LL | fn main() {}
|
||||
= help: it is possible to disable `-Z allow-partial-mitigations=stack-protector` via `-Z deny-partial-mitigations=stack-protector`
|
||||
|
||||
error: your program uses the crate `libc`, that is not compiled with `stack-protector=all` enabled
|
||||
--> $DIR/err-allow-partial-mitigations.rs:13:1
|
||||
--> $DIR/err-allow-partial-mitigations.rs:14:1
|
||||
|
|
||||
LL | fn main() {}
|
||||
| ^
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
//@ edition:future
|
||||
//@ revisions: default deny
|
||||
//@[default] compile-flags: -Z unstable-options -Z stack-protector=all
|
||||
//@[deny] compile-flags: -Z allow-partial-mitigations=!stack-protector -Z unstable-options -Z stack-protector=all
|
||||
//@[deny] compile-flags: -Z deny-partial-mitigations=stack-protector -Z unstable-options -Z stack-protector=all
|
||||
|
||||
// ^ enables stack-protector for both minicore and this crate
|
||||
|
||||
|
||||
@@ -6,6 +6,6 @@
|
||||
//@ ignore-wasm32-unknown-unknown stack protector is not supported
|
||||
//@ [both] compile-flags: -Z unstable-options -Z allow-partial-mitigations=stack-protector,control-flow-guard -C control-flow-guard=on -Z stack-protector=all
|
||||
//@ [sp] compile-flags: -Z unstable-options -Z allow-partial-mitigations=stack-protector -Z stack-protector=all
|
||||
//@ [disable-enable] compile-flags: -Z unstable-options -Z allow-partial-mitigations=!stack-protector -Z allow-partial-mitigations=stack-protector -Z stack-protector=all
|
||||
//@ [disable-enable] compile-flags: -Z unstable-options -Z deny-partial-mitigations=stack-protector -Z allow-partial-mitigations=stack-protector -Z stack-protector=all
|
||||
|
||||
fn main() {}
|
||||
|
||||
Reference in New Issue
Block a user