diff options
author | 2022-08-05 11:28:02 +0200 | |
---|---|---|
committer | 2022-08-05 11:37:16 +0200 | |
commit | 46a3f2befd6fd821e5747ce9db112c550bc989f3 (patch) | |
tree | 384667a40772d821e9d3e95a73293254170adbb5 /xtask/src/command.rs | |
parent | b48a95e87930fa51ef6fb47ad08a95d3159d9bac (diff) | |
download | rtic-46a3f2befd6fd821e5747ce9db112c550bc989f3.tar.gz rtic-46a3f2befd6fd821e5747ce9db112c550bc989f3.tar.zst rtic-46a3f2befd6fd821e5747ce9db112c550bc989f3.zip |
Fix UB in the access of `Priority` for asyc executors
The `Priority` was generated on the stack in the dispatcher
which caused it to be dropped after usage. This is now fixed
by having the `Priority` being a static variable for executors
Diffstat (limited to 'xtask/src/command.rs')
-rw-r--r-- | xtask/src/command.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/xtask/src/command.rs b/xtask/src/command.rs index 2f719bf5..528401ae 100644 --- a/xtask/src/command.rs +++ b/xtask/src/command.rs @@ -46,7 +46,14 @@ impl<'a> CargoCommand<'a> { features, mode, } => { - let mut args = vec![self.name(), "--example", example, "--target", target]; + let mut args = vec![ + "+nightly", + self.name(), + "--example", + example, + "--target", + target, + ]; if let Some(feature_name) = features { args.extend_from_slice(&["--features", feature_name]); @@ -61,7 +68,7 @@ impl<'a> CargoCommand<'a> { features, mode, } => { - let mut args = vec![self.name(), "--examples", "--target", target]; + let mut args = vec!["+nightly", self.name(), "--examples", "--target", target]; if let Some(feature_name) = features { args.extend_from_slice(&["--features", feature_name]); |