diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-03-02 16:11:01 +0530 |
|---|---|---|
| committer | Felix S. Klock II <pnkfelix@pnkfx.org> | 2015-03-03 12:10:58 +0100 |
| commit | 185c074798ce87429118868c292d2c2c7dc46cfc (patch) | |
| tree | 596726320f0585e7baf753e33bf2ee24fe54b874 /src/libstd/sys | |
| parent | 4e23179c85b3706e2ff78ecb0c014e42c56b096d (diff) | |
| download | rust-185c074798ce87429118868c292d2c2c7dc46cfc.tar.gz rust-185c074798ce87429118868c292d2c2c7dc46cfc.zip | |
Fix backtrace tests for Linux
Diffstat (limited to 'src/libstd/sys')
| -rw-r--r-- | src/libstd/sys/unix/backtrace.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/sys/unix/backtrace.rs b/src/libstd/sys/unix/backtrace.rs index 3695b615f62..0b8b43413e9 100644 --- a/src/libstd/sys/unix/backtrace.rs +++ b/src/libstd/sys/unix/backtrace.rs @@ -176,7 +176,7 @@ pub fn write(w: &mut Writer) -> IoResult<()> { let mut ip = unsafe { uw::_Unwind_GetIPInfo(ctx, &mut ip_before_insn) as *mut libc::c_void }; - if ip_before_insn == 0 { + if !ip.is_null() && ip_before_insn == 0 { // this is a non-signaling frame, so `ip` refers to the address // after the calling instruction. account for that. ip = (ip as usize - 1) as *mut _; |
