Skip to content

Commit 8cd1cfd

Browse files
Manishearthpnkfelix
authored andcommitted
---
yaml --- r: 188339 b: refs/heads/master c: 185c074 h: refs/heads/master i: 188337: a51e87a 188335: 935335c v: v3
1 parent ef73098 commit 8cd1cfd

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 4e23179c85b3706e2ff78ecb0c014e42c56b096d
2+
refs/heads/master: 185c074798ce87429118868c292d2c2c7dc46cfc
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 3a96d6a9818fe2affc98a187fb1065120458cee9
55
refs/heads/try: 649d35e4d830b27806705dc5352c86ab6d6fd1a1

trunk/src/libstd/sys/unix/backtrace.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ pub fn write(w: &mut Writer) -> IoResult<()> {
176176
let mut ip = unsafe {
177177
uw::_Unwind_GetIPInfo(ctx, &mut ip_before_insn) as *mut libc::c_void
178178
};
179-
if ip_before_insn == 0 {
179+
if !ip.is_null() && ip_before_insn == 0 {
180180
// this is a non-signaling frame, so `ip` refers to the address
181181
// after the calling instruction. account for that.
182182
ip = (ip as usize - 1) as *mut _;

trunk/src/test/run-pass/backtrace-debuginfo.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ fn dump_filelines(filelines: &[Pos]) {
6868
}
6969

7070
#[inline(never)]
71-
fn inner(counter: &mut u32, main_pos: Pos, outer_pos: Pos) {
71+
fn inner(counter: &mut i32, main_pos: Pos, outer_pos: Pos) {
7272
check!(counter; main_pos, outer_pos);
7373
check!(counter; main_pos, outer_pos);
7474
let inner_pos = pos!(); aux::callback(|aux_pos| {
@@ -80,12 +80,12 @@ fn inner(counter: &mut u32, main_pos: Pos, outer_pos: Pos) {
8080
}
8181

8282
#[inline(always)]
83-
fn inner_inlined(counter: &mut u32, main_pos: Pos, outer_pos: Pos) {
83+
fn inner_inlined(counter: &mut i32, main_pos: Pos, outer_pos: Pos) {
8484
check!(counter; main_pos, outer_pos);
8585
check!(counter; main_pos, outer_pos);
8686

8787
#[inline(always)]
88-
fn inner_further_inlined(counter: &mut u32, main_pos: Pos, outer_pos: Pos, inner_pos: Pos) {
88+
fn inner_further_inlined(counter: &mut i32, main_pos: Pos, outer_pos: Pos, inner_pos: Pos) {
8989
check!(counter; main_pos, outer_pos, inner_pos);
9090
}
9191
inner_further_inlined(counter, main_pos, outer_pos, pos!());
@@ -103,7 +103,7 @@ fn inner_inlined(counter: &mut u32, main_pos: Pos, outer_pos: Pos) {
103103
}
104104

105105
#[inline(never)]
106-
fn outer(mut counter: u32, main_pos: Pos) {
106+
fn outer(mut counter: i32, main_pos: Pos) {
107107
inner(&mut counter, main_pos, pos!());
108108
inner_inlined(&mut counter, main_pos, pos!());
109109
}

0 commit comments

Comments
 (0)