diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:20:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:20:39 +0000 |
commit | 1376c5a617be5c25655d0d7cb63e3beaa5a6e026 (patch) | |
tree | 3bb8d61aee02bc7a15eab3f36e3b921afc2075d0 /tests/ui/process | |
parent | Releasing progress-linux version 1.69.0+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.tar.xz rustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.zip |
Merging upstream version 1.70.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/process')
-rw-r--r-- | tests/ui/process/signal-exit-status.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/ui/process/signal-exit-status.rs b/tests/ui/process/signal-exit-status.rs index 9519ed7b4..0f05f916c 100644 --- a/tests/ui/process/signal-exit-status.rs +++ b/tests/ui/process/signal-exit-status.rs @@ -4,14 +4,16 @@ // ignore-windows // ignore-fuchsia code returned as ZX_TASK_RETCODE_EXCEPTION_KILL, FIXME (#58590) +#![feature(core_intrinsics)] + use std::env; use std::process::Command; pub fn main() { let args: Vec<String> = env::args().collect(); if args.len() >= 2 && args[1] == "signal" { - // Raise a segfault. - unsafe { *(1 as *mut isize) = 0; } + // Raise an aborting signal without UB + core::intrinsics::abort(); } else { let status = Command::new(&args[0]).arg("signal").status().unwrap(); assert!(status.code().is_none()); |