From 1376c5a617be5c25655d0d7cb63e3beaa5a6e026 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:20:39 +0200 Subject: Merging upstream version 1.70.0+dfsg1. Signed-off-by: Daniel Baumann --- tests/ui/process/signal-exit-status.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tests/ui/process/signal-exit-status.rs') 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 = 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()); -- cgit v1.2.3