]> 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 187ad4e66c3efcaedf613623ac714e2eccd5fdd4..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
     }
@@ -37,5 +40,3 @@ pub unsafe fn init() {
     // Set the thread stack guarantee for the main thread.
     let _h = Handler::new();
 }
-
-pub unsafe fn cleanup() {}