diff options
| author | joboet <jonasboettiger@icloud.com> | 2025-07-26 14:29:00 +0200 |
|---|---|---|
| committer | Mark Rousskov <mark.simulacrum@gmail.com> | 2025-08-01 17:36:10 -0400 |
| commit | 7ab3ec175f4adcdc2a4a4316a6d8603cf2e0b670 (patch) | |
| tree | 0d014066c7e18d8d08539afc9183502d09866207 /tests | |
| parent | f433cb4489f9a4007e8ab230a6856051e067e56b (diff) | |
| download | rust-7ab3ec175f4adcdc2a4a4316a6d8603cf2e0b670.tar.gz rust-7ab3ec175f4adcdc2a4a4316a6d8603cf2e0b670.zip | |
thread name in stack overflow message
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/runtime/out-of-stack.rs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/ui/runtime/out-of-stack.rs b/tests/ui/runtime/out-of-stack.rs index 6be34afb560..913d3637c8f 100644 --- a/tests/ui/runtime/out-of-stack.rs +++ b/tests/ui/runtime/out-of-stack.rs @@ -19,7 +19,7 @@ extern crate libc; use std::env; use std::hint::black_box; use std::process::Command; -use std::thread; +use std::thread::Builder; fn silent_recurse() { let buf = [0u8; 1000]; @@ -56,9 +56,9 @@ fn main() { } else if args.len() > 1 && args[1] == "loud" { loud_recurse(); } else if args.len() > 1 && args[1] == "silent-thread" { - thread::spawn(silent_recurse).join(); + Builder::new().name("ferris".to_string()).spawn(silent_recurse).unwrap().join(); } else if args.len() > 1 && args[1] == "loud-thread" { - thread::spawn(loud_recurse).join(); + Builder::new().name("ferris".to_string()).spawn(loud_recurse).unwrap().join(); } else { let mut modes = vec