about summary refs log tree commit diff
path: root/library/std/src/sys/pal/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorThe Miri Cronjob Bot <miri@cron.bot>2025-08-09 05:04:41 +0000
committerThe Miri Cronjob Bot <miri@cron.bot>2025-08-09 05:04:41 +0000
commit89ed3789539295070a20e6959e66ba69ce08e4cf (patch)
treed515f9dfffc22d28077ed548bac7ec82f0031555 /library/std/src/sys/pal/unix/stack_overflow.rs
parentd7a4303db25ce79633425a686b694a9e0b935a38 (diff)
parent2736d66a1f76e4829d95145a60b13bf695d5ef44 (diff)
downloadrust-89ed3789539295070a20e6959e66ba69ce08e4cf.tar.gz
rust-89ed3789539295070a20e6959e66ba69ce08e4cf.zip
Merge ref '4c7749e8c8e5' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: 4c7749e8c8e50ad146da599eea3a250160c1bc2b
Filtered ref: 9742b5940dcb4aea810f9ce020a92b3f72ed7bb4

This merge was created using https://github.com/rust-lang/josh-sync.
Diffstat (limited to 'library/std/src/sys/pal/unix/stack_overflow.rs')
-rw-r--r--library/std/src/sys/pal/unix/stack_overflow.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/library/std/src/sys/pal/unix/stack_overflow.rs b/library/std/src/sys/pal/unix/stack_overflow.rs
index d89100e6919..0d2100d66bc 100644
--- a/library/std/src/sys/pal/unix/stack_overflow.rs
+++ b/library/std/src/sys/pal/unix/stack_overflow.rs
@@ -119,7 +119,8 @@ mod imp {
                     && thread_info.guard_page_range.contains(&fault_addr)
                 {
                     let name = thread_info.thread_name.as_deref().unwrap_or("<unknown>");
-                    rtprintpanic!("\nthread '{name}' has overflowed its stack\n");
+                    let tid = crate::thread::current_os_id();
+                    rtprintpanic!("\nthread '{name}' ({tid}) has overflowed its stack\n");
                     rtabort!("stack overflow");
                 }
             })
@@ -696,7 +697,8 @@ mod imp {
             if code == c::EXCEPTION_STACK_OVERFLOW {
                 crate::thread::with_current_name(|name| {
                     let name = name.unwrap_or("<unknown>");
-                    rtprintpanic!("\nthread '{name}' has overflowed its stack\n");
+                    let tid = crate::thread::current_os_id();
+                    rtprintpanic!("\nthread '{name}' ({tid}) has overflowed its stack\n");
                 });
             }
             c::EXCEPTION_CONTINUE_SEARCH