diff options
| author | bors <bors@rust-lang.org> | 2021-05-20 04:58:13 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-05-20 04:58:13 +0000 |
| commit | 5ab0f37087b61b2ea51f364498cddc20ecff74fa (patch) | |
| tree | 6a91baf3a776ee830c8fd604503f04d95f567340 /library/std/src/sys/windows/stack_overflow.rs | |
| parent | a426fc37f2269093ef1a4dbb3e31b3247980fccc (diff) | |
| parent | 4ff5ab52966203b8ad8da96f897566e4a218308a (diff) | |
| download | rust-5ab0f37087b61b2ea51f364498cddc20ecff74fa.tar.gz rust-5ab0f37087b61b2ea51f364498cddc20ecff74fa.zip | |
Auto merge of #84697 - CDirkx:util, r=m-ou-se
Introduce `sys_common::rt::rtprintpanic!` to replace `sys_common::util` functionality This PR introduces a new macro `rtprintpanic!`, similar to `sys_common::util::dumb_print` and uses that macro to replace all `sys_common::util` functionality.
Diffstat (limited to 'library/std/src/sys/windows/stack_overflow.rs')
| -rw-r--r-- | library/std/src/sys/windows/stack_overflow.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/library/std/src/sys/windows/stack_overflow.rs b/library/std/src/sys/windows/stack_overflow.rs index 39efb778207..755dc0a6c8b 100644 --- a/library/std/src/sys/windows/stack_overflow.rs +++ b/library/std/src/sys/windows/stack_overflow.rs @@ -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 } |
