From a6c0519faef6512aff1ee1a1fe2bf2556fe2d642 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 2 Sep 2025 12:09:05 +0200 Subject: improve process::abort rendering in Miri backtraces --- library/std/src/sys/pal/unix/mod.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'library/std/src/sys/pal/unix/mod.rs') diff --git a/library/std/src/sys/pal/unix/mod.rs b/library/std/src/sys/pal/unix/mod.rs index 400128acf12..ac5c823a1bf 100644 --- a/library/std/src/sys/pal/unix/mod.rs +++ b/library/std/src/sys/pal/unix/mod.rs @@ -364,6 +364,7 @@ pub fn cvt_nz(error: libc::c_int) -> crate::io::Result<()> { // multithreaded C program. It is much less severe for Rust, because Rust // stdlib doesn't use libc stdio buffering. In a typical Rust program, which // does not use C stdio, even a buggy libc::abort() is, in fact, safe. +#[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces pub fn abort_internal() -> ! { unsafe { libc::abort() } } -- cgit 1.4.1-3-g733a5