Skip to content

Commit 6b79e0e

Browse files
committed
---
yaml --- r: 95626 b: refs/heads/dist-snap c: e117aa0 h: refs/heads/master v: v3
1 parent d8c5678 commit 6b79e0e

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: c274a6888410ce3e357e014568b43310ed787d36
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 61ed2cfb5516f76487509766b1054275f1340f70
9+
refs/heads/dist-snap: e117aa0e2a4121aab101cb7526a5e79812bfb76e
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/libstd/rt/task.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,6 @@ pub fn begin_unwind(msg: *c_char, file: *c_char, line: size_t) -> ! {
546546
use rt::in_green_task_context;
547547
use rt::task::Task;
548548
use rt::local::Local;
549-
use rt::logging::Logger;
550549
use str::Str;
551550
use c_str::CString;
552551
use unstable::intrinsics;
@@ -573,16 +572,19 @@ pub fn begin_unwind(msg: *c_char, file: *c_char, line: size_t) -> ! {
573572
// have been failing due to a lack of memory in the first place...
574573
let task: *mut Task = Local::unsafe_borrow();
575574
let n = (*task).name.as_ref().map(|n| n.as_slice()).unwrap_or("<unnamed>");
575+
576+
// XXX: this should no get forcibly printed to the console, this should
577+
// either be sent to the parent task (ideally), or get printed to
578+
// the task's logger. Right now the logger is actually a uvio
579+
// instance, which uses unkillable blocks internally for various
580+
// reasons. This will cause serious trouble if the task is failing
581+
// due to mismanagment of its own kill flag, so calling our own
582+
// logger in its current state is a bit of a problem.
576583
match file.as_str() {
577584
Some(file) => {
578-
format_args!(|args| { (*task).logger.log(args) },
579-
"task '{}' failed at '{}', {}:{}",
580-
n, msg, file, line);
581-
}
582-
None => {
583-
format_args!(|args| { (*task).logger.log(args) },
584-
"task '{}' failed at '{}'", n, msg);
585+
rterrln!("task '{}' failed at '{}', {}:{}", n, msg, file, line);
585586
}
587+
None => rterrln!("task '{}' failed at '{}'", n, msg),
586588
}
587589
if (*task).unwinder.unwinding {
588590
rtabort!("unwinding again");

branches/dist-snap/src/libstd/rt/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ pub fn default_sched_threads() -> uint {
7272
pub fn dumb_println(args: &fmt::Arguments) {
7373
use rt::io::native::stdio::stderr;
7474
use rt::io::{Writer, io_error, ResourceUnavailable};
75-
let mut out = stderr();
7675

76+
let mut out = stderr();
7777
let mut again = true;
7878
do io_error::cond.trap(|e| {
7979
again = e.kind == ResourceUnavailable;

0 commit comments

Comments
 (0)