address review comments

This commit is contained in:
Ariel Ben-Yehuda
2026-04-07 00:32:29 +03:00
parent a0ff19d8ec
commit 1b96797c08
25 changed files with 416 additions and 225 deletions
+1 -1
View File
@@ -702,7 +702,7 @@ pub(crate) struct UnusedCrateDependency {
"your program uses the crate `{$extern_crate}`, that is not compiled with `{$mitigation_name}{$mitigation_level}` enabled"
)]
#[note(
"recompile `{$extern_crate}` with `{$mitigation_name}{$mitigation_level}` enabled, or use `-Z allow-partial-mitigations={$mitigation_name}` to allow creating an artifact that has the mitigation only partially enabled "
"recompile `{$extern_crate}` with `{$mitigation_name}{$mitigation_level}` enabled, or use `-Z allow-partial-mitigations={$mitigation_name}` to allow creating an artifact that has the mitigation partially enabled "
)]
#[help(
"it is possible to disable `-Z allow-partial-mitigations={$mitigation_name}` via `-Z deny-partial-mitigations={$mitigation_name}`"
+5 -2
View File
@@ -79,10 +79,13 @@ pub(crate) fn bytes(&self) -> &OwnedSlice {
/// own crate numbers.
pub(crate) type CrateNumMap = IndexVec<CrateNum, CrateNum>;
/// Target modifiers - abi or exploit mitigations flags that cause unsoundness when mixed
/// Target modifiers - abi or exploit mitigations options that may cause unsoundness when mixed or
/// partially enabled.
pub(crate) type TargetModifiers = Vec<TargetModifier>;
/// The set of enforceable mitigations (RFC 3855) that are currently enabled for this crate
/// The set of mitigations that cannot be partially enabled (see
/// [RFC 3855](https://github.com/rust-lang/rfcs/pull/3855)), but are currently enabled for this
/// crate.
pub(crate) type DeniedPartialMitigations = Vec<DeniedPartialMitigation>;
pub(crate) struct CrateMetadata {
+2 -2
View File
@@ -716,8 +716,8 @@ macro_rules! stat {
// `SourceFiles` we actually need to encode.
let source_map = stat!("source-map", || self.encode_source_map());
let target_modifiers = stat!("target-modifiers", || self.encode_target_modifiers());
let denied_partial_mitigations =
stat!("enforced-mitigations", || self.encode_enabled_denied_partial_mitigations());
let denied_partial_mitigations = stat!("denied-partial-mitigations", || self
.encode_enabled_denied_partial_mitigations());
let root = stat!("final", || {
let attrs = tcx.hir_krate_attrs();
@@ -167,12 +167,12 @@ fn from_str(v: &str) -> Result<DeniedPartialMitigationKind, DeniedPartialMitigat
#[allow(unused)]
impl DeniedPartialMitigationKind {
pub fn allowed_by_default_at(&self, edition: Edition) -> bool {
let enforced_since = match self {
// Should change the enforced-since edition of StackProtector to 2015
let denied_since = match self {
// Should change the denied-since edition of StackProtector to 2015
// (all editions) when `-C stack-protector` is stabilized.
$(DeniedPartialMitigationKind::$name => Edition::$since),*
};
edition < enforced_since
edition < denied_since
}
}
@@ -209,7 +209,9 @@ enum DeniedPartialMitigationKind {
}
}
/// Denied-partial mitigations, see [RFC 3855](https://github.com/rust-lang/rfcs/pull/3855)
/// A mitigation that cannot be partially enabled (see
/// [RFC 3855](https://github.com/rust-lang/rfcs/pull/3855)), but are currently enabled for this
/// crate.
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Encodable, BlobDecodable)]
pub struct DeniedPartialMitigation {
pub kind: DeniedPartialMitigationKind,
+2 -2
View File
@@ -24,9 +24,9 @@ See [Allocator traits and `std::heap` #32838](https://github.com/rust-lang/rust/
## `tests/ui/allow-partial-mitigations`
These tests exercise the check against partial mitigation enforcement.
These tests exercise the support for mitigation coverage and the `allow-partial-mitigations` and `deny-partial-mitigations` options.
See [the mitigation enforcement RFC](https://github.com/rust-lang/rfcs/pull/3855).
See [RFC 3855](https://github.com/rust-lang/rfcs/pull/3855).
## `tests/ui/annotate-moves`
@@ -1,46 +1,46 @@
error: your program uses the crate `std`, that is not compiled with `control-flow-guard` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:15:1
--> $DIR/err-allow-partial-mitigations-1-error.rs:34: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
= 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 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 `control-flow-guard` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:15:1
--> $DIR/err-allow-partial-mitigations-1-error.rs:34: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
= 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 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 `control-flow-guard` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:15:1
--> $DIR/err-allow-partial-mitigations-1-error.rs:34: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
= 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 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 `control-flow-guard` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:15:1
--> $DIR/err-allow-partial-mitigations-1-error.rs:34: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
= 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 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 `control-flow-guard` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:15:1
--> $DIR/err-allow-partial-mitigations-1-error.rs:34: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
= 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 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 5 previous errors
@@ -1,16 +1,35 @@
// ignore-tidy-linelength
//@ revisions: sp disable enable-disable wrong-enable disable-enable-reset cfg-allow-first sp-allow-first
//@ revisions: stack-protector-future stack-protector-future-explicit-deny stack-protector-future-deny-reset-by-mitigation stack-protector-allow-then-deny stack-protector-but-allow-control-flow-guard control-flow-guard-future-allow-reset-by-mitigation stack-protector-future-allow-reset-by-mitigation stack-protector-future-deny-allow-reset-by-mitigation
//@ check-fail
//@ ignore-nvptx64 stack protector is not supported
//@ ignore-wasm32-unknown-unknown stack protector is not supported
//@ edition:future
//@ [sp] compile-flags: -Z unstable-options -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
//@ [cfg-allow-first] compile-flags: -Z unstable-options -Z allow-partial-mitigations=stack-protector -C control-flow-guard=on
//@ [sp-allow-first] compile-flags: -Z unstable-options -Z allow-partial-mitigations=stack-protector -Z stack-protector=all
//@ [disable-enable-reset] compile-flags: -Z unstable-options -Z deny-partial-mitigations=stack-protector -Z allow-partial-mitigations=stack-protector -Z stack-protector=all
// test that stack-protector is denied-partial in edition=future
//@ [stack-protector-future] compile-flags: -Z unstable-options -Z stack-protector=all
// same, but with explicit deny
//@ [stack-protector-future-explicit-deny] compile-flags: -Z unstable-options -Z stack-protector=all -Z deny-partial-mitigations=stack-protector
// same, but with explicit deny before the enable. The `-Z stack-protector=all` resets the mitigation status
// to default which is deny at edition=future.
// at edition=2024, this would be allowed, see ok-allow-partial-mitigations-current-edition scenario stack-protector-future-deny-reset-by-mitigation
//@ [stack-protector-future-deny-reset-by-mitigation] compile-flags: -Z unstable-options -Z deny-partial-mitigations=stack-protector -Z stack-protector=all
// same, but with explicit allow followed by explicit deny
//@ [stack-protector-allow-then-deny] compile-flags: -Z unstable-options -Z stack-protector=all -Z allow-partial-mitigations=stack-protector -Z deny-partial-mitigations=stack-protector
// check that allowing an unrelated mitigation (control-flow-guard) does not allow a different mitigation (stack-protector)
//@ [stack-protector-but-allow-control-flow-guard] compile-flags: -Z unstable-options -Z stack-protector=all -Z allow-partial-mitigations=control-flow-guard
// check that `-C control-flow-guard` overrides the `-Z allow-partial-mitigations=control-flow-guard` (to the default, which is deny at edition=future)
//@ [control-flow-guard-future-allow-reset-by-mitigation] compile-flags: -Z unstable-options -Z allow-partial-mitigations=control-flow-guard -C control-flow-guard=on
// check that `-Z stack-protector` overrides the `-Z allow-partial-mitigations=stack-protector` (to the default, which is deny at edition=future)
//@ [stack-protector-future-allow-reset-by-mitigation] compile-flags: -Z unstable-options -Z allow-partial-mitigations=stack-protector -Z stack-protector=all
// check that this is the case even if there was a "deny" before the "allow"
//@ [stack-protector-future-deny-allow-reset-by-mitigation] compile-flags: -Z unstable-options -Z deny-partial-mitigations=stack-protector -Z allow-partial-mitigations=stack-protector -Z stack-protector=all
fn main() {}
//~^ ERROR that is not compiled with
@@ -1,47 +0,0 @@
error: your program uses the crate `std`, that is not compiled with `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:15: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 `core`, that is not compiled with `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:15: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 `alloc`, that is not compiled with `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:15: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 `compiler_builtins`, that is not compiled with `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:15: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 `libc`, that is not compiled with `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:15: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: aborting due to 5 previous errors
@@ -1,46 +1,46 @@
error: your program uses the crate `std`, that is not compiled with `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:15:1
--> $DIR/err-allow-partial-mitigations-1-error.rs:34: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
= 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 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 `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:15:1
--> $DIR/err-allow-partial-mitigations-1-error.rs:34: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
= 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 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 `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:15:1
--> $DIR/err-allow-partial-mitigations-1-error.rs:34: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
= 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 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 `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:15:1
--> $DIR/err-allow-partial-mitigations-1-error.rs:34: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
= 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 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 `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:15:1
--> $DIR/err-allow-partial-mitigations-1-error.rs:34: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
= 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 partially enabled
= help: it is possible to disable `-Z allow-partial-mitigations=stack-protector` via `-Z deny-partial-mitigations=stack-protector`
error: aborting due to 5 previous errors
@@ -1,46 +1,46 @@
error: your program uses the crate `std`, that is not compiled with `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:15:1
--> $DIR/err-allow-partial-mitigations-1-error.rs:34: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
= 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 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 `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:15:1
--> $DIR/err-allow-partial-mitigations-1-error.rs:34: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
= 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 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 `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:15:1
--> $DIR/err-allow-partial-mitigations-1-error.rs:34: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
= 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 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 `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:15:1
--> $DIR/err-allow-partial-mitigations-1-error.rs:34: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
= 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 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 `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:15:1
--> $DIR/err-allow-partial-mitigations-1-error.rs:34: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
= 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 partially enabled
= help: it is possible to disable `-Z allow-partial-mitigations=stack-protector` via `-Z deny-partial-mitigations=stack-protector`
error: aborting due to 5 previous errors
@@ -1,46 +1,46 @@
error: your program uses the crate `std`, that is not compiled with `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:15:1
--> $DIR/err-allow-partial-mitigations-1-error.rs:34: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
= 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 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 `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:15:1
--> $DIR/err-allow-partial-mitigations-1-error.rs:34: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
= 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 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 `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:15:1
--> $DIR/err-allow-partial-mitigations-1-error.rs:34: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
= 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 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 `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:15:1
--> $DIR/err-allow-partial-mitigations-1-error.rs:34: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
= 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 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 `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:15:1
--> $DIR/err-allow-partial-mitigations-1-error.rs:34: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
= 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 partially enabled
= help: it is possible to disable `-Z allow-partial-mitigations=stack-protector` via `-Z deny-partial-mitigations=stack-protector`
error: aborting due to 5 previous errors
@@ -1,46 +1,46 @@
error: your program uses the crate `std`, that is not compiled with `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:15:1
--> $DIR/err-allow-partial-mitigations-1-error.rs:34: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
= 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 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 `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:15:1
--> $DIR/err-allow-partial-mitigations-1-error.rs:34: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
= 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 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 `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:15:1
--> $DIR/err-allow-partial-mitigations-1-error.rs:34: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
= 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 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 `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:15:1
--> $DIR/err-allow-partial-mitigations-1-error.rs:34: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
= 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 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 `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:15:1
--> $DIR/err-allow-partial-mitigations-1-error.rs:34: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
= 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 partially enabled
= help: it is possible to disable `-Z allow-partial-mitigations=stack-protector` via `-Z deny-partial-mitigations=stack-protector`
error: aborting due to 5 previous errors
@@ -0,0 +1,47 @@
error: your program uses the crate `std`, that is not compiled with `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:34: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 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 `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:34: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 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 `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:34: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 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 `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:34: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 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 `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:34: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 partially enabled
= help: it is possible to disable `-Z allow-partial-mitigations=stack-protector` via `-Z deny-partial-mitigations=stack-protector`
error: aborting due to 5 previous errors
@@ -0,0 +1,47 @@
error: your program uses the crate `std`, that is not compiled with `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:34: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 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 `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:34: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 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 `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:34: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 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 `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:34: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 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 `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:34: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 partially enabled
= help: it is possible to disable `-Z allow-partial-mitigations=stack-protector` via `-Z deny-partial-mitigations=stack-protector`
error: aborting due to 5 previous errors
@@ -0,0 +1,47 @@
error: your program uses the crate `std`, that is not compiled with `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:34: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 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 `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:34: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 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 `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:34: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 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 `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:34: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 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 `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:34: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 partially enabled
= help: it is possible to disable `-Z allow-partial-mitigations=stack-protector` via `-Z deny-partial-mitigations=stack-protector`
error: aborting due to 5 previous errors
@@ -1,47 +0,0 @@
error: your program uses the crate `std`, that is not compiled with `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:15: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 `core`, that is not compiled with `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:15: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 `alloc`, that is not compiled with `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:15: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 `compiler_builtins`, that is not compiled with `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:15: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 `libc`, that is not compiled with `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-1-error.rs:15: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: aborting due to 5 previous errors
@@ -1,91 +1,91 @@
error: your program uses the crate `std`, that is not compiled with `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-2-errors.rs:10:1
--> $DIR/err-allow-partial-mitigations-2-errors.rs:18: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
= 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 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-2-errors.rs:10:1
--> $DIR/err-allow-partial-mitigations-2-errors.rs:18: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
= 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 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-2-errors.rs:10:1
--> $DIR/err-allow-partial-mitigations-2-errors.rs:18: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
= 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 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-2-errors.rs:10:1
--> $DIR/err-allow-partial-mitigations-2-errors.rs:18: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
= 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 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-2-errors.rs:10:1
--> $DIR/err-allow-partial-mitigations-2-errors.rs:18: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
= 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 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-2-errors.rs:10:1
--> $DIR/err-allow-partial-mitigations-2-errors.rs:18: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
= 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 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-2-errors.rs:10:1
--> $DIR/err-allow-partial-mitigations-2-errors.rs:18: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
= 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 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-2-errors.rs:10:1
--> $DIR/err-allow-partial-mitigations-2-errors.rs:18: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
= 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 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-2-errors.rs:10:1
--> $DIR/err-allow-partial-mitigations-2-errors.rs:18: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
= 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 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-2-errors.rs:10:1
--> $DIR/err-allow-partial-mitigations-2-errors.rs:18: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
= 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 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,91 +1,91 @@
error: your program uses the crate `std`, that is not compiled with `stack-protector=all` enabled
--> $DIR/err-allow-partial-mitigations-2-errors.rs:10:1
--> $DIR/err-allow-partial-mitigations-2-errors.rs:18: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
= 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 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-2-errors.rs:10:1
--> $DIR/err-allow-partial-mitigations-2-errors.rs:18: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
= 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 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-2-errors.rs:10:1
--> $DIR/err-allow-partial-mitigations-2-errors.rs:18: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
= 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 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-2-errors.rs:10:1
--> $DIR/err-allow-partial-mitigations-2-errors.rs:18: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
= 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 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-2-errors.rs:10:1
--> $DIR/err-allow-partial-mitigations-2-errors.rs:18: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
= 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 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-2-errors.rs:10:1
--> $DIR/err-allow-partial-mitigations-2-errors.rs:18: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
= 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 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-2-errors.rs:10:1
--> $DIR/err-allow-partial-mitigations-2-errors.rs:18: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
= 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 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-2-errors.rs:10:1
--> $DIR/err-allow-partial-mitigations-2-errors.rs:18: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
= 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 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-2-errors.rs:10:1
--> $DIR/err-allow-partial-mitigations-2-errors.rs:18: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
= 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 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-2-errors.rs:10:1
--> $DIR/err-allow-partial-mitigations-2-errors.rs:18: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
= 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 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
@@ -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-2-errors.rs:18: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 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-2-errors.rs:18: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 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-2-errors.rs:18: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 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-2-errors.rs:18: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 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-2-errors.rs:18: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 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-2-errors.rs:18: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 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-2-errors.rs:18: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 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-2-errors.rs:18: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 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-2-errors.rs:18: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 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-2-errors.rs:18: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 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,11 +1,19 @@
// ignore-tidy-linelength
//@ revisions: both enable-separately-disable-together
//@ revisions: both enable-separately-disable-together enable-together-disable-separately
//@ check-fail
//@ ignore-nvptx64 stack protector is not supported
//@ ignore-wasm32-unknown-unknown stack protector is not supported
//@ edition:future
// just use 2 partial mitigations, without any allow/deny flag. Should be denied at edition=future.
//@ [both] compile-flags: -Z unstable-options -C control-flow-guard=on -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
// check that mitigations are denied if they are enabled separately and then disabled in a single command,
// to test the "foo,bar" syntax
//@ [enable-separately-disable-together] compile-flags: -Z unstable-options -C control-flow-guard=on -Z stack-protector=all -Z allow-partial-mitigations=stack-protector -Z allow-partial-mitigations=control-flow-guard -Z deny-partial-mitigations=control-flow-guard,stack-protector
// same, but for allow
//@ [enable-together-disable-separately] compile-flags: -Z unstable-options -C control-flow-guard=on -Z stack-protector=all -Z allow-partial-mitigations=stack-protector,control-flow-guard -Z deny-partial-mitigations=control-flow-guard -Z deny-partial-mitigations=stack-protector
fn main() {}
//~^ ERROR that is not compiled with
@@ -5,7 +5,7 @@
//@ edition:future
//@ compile-flags: -Z unstable-options -Z deny-partial-mitigations=garbage
// have a test that the list of mitigations is generated correctly
// test that the list of mitigations in the error message is generated correctly
//~? ERROR incorrect value `garbage` for unstable option `deny-partial-mitigations` - comma-separated list of mitigation kinds (available:
@@ -1,46 +1,46 @@
error: your program uses the crate `std`, that is not compiled with `control-flow-guard` enabled
--> $DIR/err-allow-partial-mitigations-current-edition.rs:12:1
--> $DIR/err-allow-partial-mitigations-current-edition.rs:13: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
= 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 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 `control-flow-guard` enabled
--> $DIR/err-allow-partial-mitigations-current-edition.rs:12:1
--> $DIR/err-allow-partial-mitigations-current-edition.rs:13: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
= 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 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 `control-flow-guard` enabled
--> $DIR/err-allow-partial-mitigations-current-edition.rs:12:1
--> $DIR/err-allow-partial-mitigations-current-edition.rs:13: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
= 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 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 `control-flow-guard` enabled
--> $DIR/err-allow-partial-mitigations-current-edition.rs:12:1
--> $DIR/err-allow-partial-mitigations-current-edition.rs:13: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
= 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 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 `control-flow-guard` enabled
--> $DIR/err-allow-partial-mitigations-current-edition.rs:12:1
--> $DIR/err-allow-partial-mitigations-current-edition.rs:13: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
= 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 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 5 previous errors
@@ -1,9 +1,10 @@
// ignore-tidy-linelength
//@ revisions: control-flow-2024-explicit-deny
//@ check-fail
//@ ignore-nvptx64 stack protector is not supported
//@ ignore-wasm32-unknown-unknown stack protector is not supported
//@ edition: 2024
//@ compile-flags: -C control-flow-guard=on -Z deny-partial-mitigations=control-flow-guard
//@ [control-flow-2024-explicit-deny] compile-flags: -C control-flow-guard=on -Z deny-partial-mitigations=control-flow-guard
// check that in edition 2024, it is still possible to explicitly
// disallow partial mitigations (in edition=future, they are
@@ -1,13 +1,25 @@
// ignore-tidy-linelength
//@ revisions: no-deny deny-first
//@ revisions: control-flow-guard-2024-default control-flow-guard-2024-deny-reset-by-mitigation stack-protector-2024-deny-reset-by-mitigation stack-protector-2024-allow-deny-reset-by-mitigation
//@ check-pass
//@ ignore-nvptx64 stack protector is not supported
//@ ignore-wasm32-unknown-unknown stack protector is not supported
//@ edition: 2024
//@ [deny-first] compile-flags: -Z deny-partial-mitigations=control-flow-guard -C control-flow-guard=on
//@ [no-deny] compile-flags: -C control-flow-guard=on
// check that the `-C control-flow-guard=on` overrides the `-Z deny-partial-mitigations=control-flow-guard`,
// which in edition 2024 leads to partial mitigations being allowed
// which in edition 2024 leads to partial mitigations being allowed. Test with both an explicit
// deny and without one.
// just test control-flow-guard at edition 2024. allowed-partial due to backwards compatibility.
//@ [control-flow-guard-2024-default] compile-flags: -C control-flow-guard=on
// test that -C control-flow-guard=on resets -Z deny-partial-mitigations=control-flow-guard
//@ [control-flow-guard-2024-deny-reset-by-mitigation] compile-flags: -Z deny-partial-mitigations=control-flow-guard -C control-flow-guard=on
// same but for stack-protector, to match the stack-protector-future-deny-reset-by-mitigation test in
// err-allow-partial-mitigations-1-error (which has the same args but on edition=future).
//@ [stack-protector-2024-deny-reset-by-mitigation] compile-flags: -Z deny-partial-mitigations=stack-protector -Z stack-protector=all
// check that this is the case even if there was an "allow" then a "deny"
//@ [stack-protector-2024-allow-deny-reset-by-mitigation] compile-flags: -Z unstable-options -Z allow-partial-mitigations=stack-protector -Z deny-partial-mitigations=stack-protector -Z stack-protector=all
fn main() {}
@@ -1,11 +1,18 @@
// ignore-tidy-linelength
//@ revisions: sp both disable-enable
//@ revisions: stack-protector-explicit-allow stack-protector-and-control-flow-guard-explicit-allow stack-protector-deny-then-allow
//@ check-pass
//@ edition:future
//@ ignore-nvptx64 stack protector is not supported
//@ ignore-wasm32-unknown-unknown stack protector is not supported
//@ [both] compile-flags: -Z unstable-options -Z stack-protector=all -C control-flow-guard=on -Z allow-partial-mitigations=stack-protector,control-flow-guard
//@ [sp] compile-flags: -Z unstable-options -Z stack-protector=all -Z allow-partial-mitigations=stack-protector
//@ [disable-enable] compile-flags: -Z unstable-options -Z deny-partial-mitigations=stack-protector -Z stack-protector=all -Z allow-partial-mitigations=stack-protector
// requesting both stack-protector and control-flow-guard and then allow-partial-mitigations it
//@ [stack-protector-and-control-flow-guard-explicit-allow] compile-flags: -Z unstable-options -Z stack-protector=all -C control-flow-guard=on -Z allow-partial-mitigations=stack-protector,control-flow-guard
// requesting stack-protector and then allow-partial-mitigations it
//@ [stack-protector-explicit-allow] compile-flags: -Z unstable-options -Z stack-protector=all -Z allow-partial-mitigations=stack-protector
// testing that the later allow-partial-mitigations overrides the earlier deny-partial-mitigations
// see also the stack-protector-allow-then-deny test (in the error tests) for the other order
//@ [stack-protector-deny-then-allow] compile-flags: -Z unstable-options -Z stack-protector=all -Z deny-partial-mitigations=stack-protector -Z allow-partial-mitigations=stack-protector
fn main() {}