]> git.lizzy.rs Git - rust.git/blobdiff - library/std/src/sys/windows/stack_overflow.rs
Rename `rterr` to `rtprintpanic`
[rust.git] / library / std / src / sys / windows / stack_overflow.rs
index 39efb778207fc5386729b34ce9d4d8fecd7a6e7c..755dc0a6c8b47045a5ce45149d0f1762a454a3bc 100644 (file)
@@ -1,7 +1,7 @@
 #![cfg_attr(test, allow(dead_code))]
 
 use crate::sys::c;
-use crate::sys_common::util::report_overflow;
+use crate::thread;
 
 pub struct Handler;
 
@@ -24,7 +24,10 @@ extern "system" fn vectored_handler(ExceptionInfo: *mut c::EXCEPTION_POINTERS) -
         let code = rec.ExceptionCode;
 
         if code == c::EXCEPTION_STACK_OVERFLOW {
-            report_overflow();
+            rtprintpanic!(
+                "\nthread '{}' has overflowed its stack\n",
+                thread::current().name().unwrap_or("<unknown>")
+            );
         }
         c::EXCEPTION_CONTINUE_SEARCH
     }