Skip to content

Commit 1918515

Browse files
Manishearthpnkfelix
authored andcommitted
---
yaml --- r: 188312 b: refs/heads/tmp c: 185c074 h: refs/heads/master v: v3
1 parent f31f80b commit 1918515

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
@@ -34,5 +34,5 @@ refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3434
refs/heads/beta: 522d09dfecbeca1595f25ac58c6d0178bbd21d7d
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
37-
refs/heads/tmp: 4e23179c85b3706e2ff78ecb0c014e42c56b096d
37+
refs/heads/tmp: 185c074798ce87429118868c292d2c2c7dc46cfc
3838
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/tmp/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 _;

branches/tmp/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)