std::rt::backtrace: Fix backtrace on Win64

`struct CONTEXT` and its substructs require 16-byte alignment.
This commit is contained in:
klutzy 2014-09-18 22:37:46 +09:00
parent 9508faa227
commit 0d70d57617

View file

@ -831,9 +831,11 @@ mod imp {
mod arch { mod arch {
use libc::{c_longlong, c_ulonglong}; use libc::{c_longlong, c_ulonglong};
use libc::types::os::arch::extra::{WORD, DWORD, DWORDLONG}; use libc::types::os::arch::extra::{WORD, DWORD, DWORDLONG};
use simd;
#[repr(C)] #[repr(C)]
pub struct CONTEXT { pub struct CONTEXT {
_align_hack: [simd::u64x2, ..0], // FIXME align on 16-byte
P1Home: DWORDLONG, P1Home: DWORDLONG,
P2Home: DWORDLONG, P2Home: DWORDLONG,
P3Home: DWORDLONG, P3Home: DWORDLONG,
@ -892,12 +894,14 @@ mod imp {
#[repr(C)] #[repr(C)]
pub struct M128A { pub struct M128A {
_align_hack: [simd::u64x2, ..0], // FIXME align on 16-byte
Low: c_ulonglong, Low: c_ulonglong,
High: c_longlong High: c_longlong
} }
#[repr(C)] #[repr(C)]
pub struct FLOATING_SAVE_AREA { pub struct FLOATING_SAVE_AREA {
_align_hack: [simd::u64x2, ..0], // FIXME align on 16-byte
_Dummy: [u8, ..512] // FIXME: Fill this out _Dummy: [u8, ..512] // FIXME: Fill this out
} }