diff --git a/src/libstd/panicking.rs b/src/libstd/panicking.rs index 3f9a1c30ef4..8561ecd9c4c 100644 --- a/src/libstd/panicking.rs +++ b/src/libstd/panicking.rs @@ -206,7 +206,7 @@ pub fn on_panic(obj: &(Any+Send), file: &'static str, line: u32) { // debugger provides a useable stacktrace. if panics >= 3 { util::dumb_print(format_args!("thread panicked while processing \ - panic. aborting.")); + panic. aborting.\n")); unsafe { intrinsics::abort() } } @@ -232,7 +232,7 @@ pub fn on_panic(obj: &(Any+Send), file: &'static str, line: u32) { // just abort. In the future we may consider resuming // unwinding or otherwise exiting the thread cleanly. util::dumb_print(format_args!("thread panicked while panicking. \ - aborting.")); + aborting.\n")); unsafe { intrinsics::abort() } } } diff --git a/src/libstd/sys/common/util.rs b/src/libstd/sys/common/util.rs index 979f1f48669..b7a6b7650d5 100644 --- a/src/libstd/sys/common/util.rs +++ b/src/libstd/sys/common/util.rs @@ -35,12 +35,12 @@ pub fn dumb_print(args: fmt::Arguments) { } pub fn abort(args: fmt::Arguments) -> ! { - dumb_print(format_args!("fatal runtime error: {}", args)); + dumb_print(format_args!("fatal runtime error: {}\n", args)); unsafe { intrinsics::abort(); } } #[allow(dead_code)] // stack overflow detection not enabled on all platforms pub unsafe fn report_overflow() { - dumb_print(format_args!("\nthread '{}' has overflowed its stack", + dumb_print(format_args!("\nthread '{}' has overflowed its stack\n", thread::current().name().unwrap_or(""))); } diff --git a/src/libstd/sys/windows/mod.rs b/src/libstd/sys/windows/mod.rs index 7e4db3d89a3..16c4ae8257c 100644 --- a/src/libstd/sys/windows/mod.rs +++ b/src/libstd/sys/windows/mod.rs @@ -53,7 +53,7 @@ fn oom_handler() -> ! { // is no need to check the result of GetStdHandle. c::WriteFile(c::GetStdHandle(c::STD_ERROR_HANDLE), msg.as_ptr() as c::LPVOID, - msg.len() as DWORD, + msg.len() as c::DWORD, ptr::null_mut(), ptr::null_mut()); intrinsics::abort();