Skip to content

Commit c48a94a

Browse files
committed
---
yaml --- r: 94838 b: refs/heads/try c: d459e80 h: refs/heads/master v: v3
1 parent a4c2732 commit c48a94a

File tree

2 files changed

+22
-15
lines changed

2 files changed

+22
-15
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 0da105a8b7b6b1e0568e8ff20f6ff4b13cc7ecc2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d3e57dca68fde4effdda3e4ae2887aa535fcd6
5-
refs/heads/try: ff801d662ebdebee4845dcc825b366215e4b88bf
5+
refs/heads/try: d459e805df076ace12ed3f7f57f2b1378f0e2403
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/libstd/rt/unwind.rs

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -180,22 +180,29 @@ impl Unwinder {
180180
self.unwinding = true;
181181
self.cause = Some(cause);
182182

183-
unsafe {
184-
let exception = ~uw::_Unwind_Exception {
185-
exception_class: rust_exception_class(),
186-
exception_cleanup: exception_cleanup,
187-
private_1: 0,
188-
private_2: 0
189-
};
190-
let error = uw::_Unwind_RaiseException(cast::transmute(exception));
191-
rtabort!("Could not unwind stack, error = {}", error as int)
192-
}
183+
rust_fail();
193184

194-
extern "C" fn exception_cleanup(_unwind_code: uw::_Unwind_Reason_Code,
195-
exception: *uw::_Unwind_Exception) {
196-
rtdebug!("exception_cleanup()");
185+
// An uninlined, unmangled function upon which to slap yer breakpoints
186+
#[inline(never)]
187+
#[no_mangle]
188+
fn rust_fail() -> ! {
197189
unsafe {
198-
let _: ~uw::_Unwind_Exception = cast::transmute(exception);
190+
let exception = ~uw::_Unwind_Exception {
191+
exception_class: rust_exception_class(),
192+
exception_cleanup: exception_cleanup,
193+
private_1: 0,
194+
private_2: 0
195+
};
196+
let error = uw::_Unwind_RaiseException(cast::transmute(exception));
197+
rtabort!("Could not unwind stack, error = {}", error as int)
198+
}
199+
200+
extern "C" fn exception_cleanup(_unwind_code: uw::_Unwind_Reason_Code,
201+
exception: *uw::_Unwind_Exception) {
202+
rtdebug!("exception_cleanup()");
203+
unsafe {
204+
let _: ~uw::_Unwind_Exception = cast::transmute(exception);
205+
}
199206
}
200207
}
201208
}

0 commit comments

Comments
 (0)