Parcourir la source

libunwind code movaps xmm, 0xxx0(rsp) is causing misaligned exception (#1)

but compiler default is 16 byte aligned.
align stack boundary to 8 bytes
default it aligns to 16, but somehow rsp is not 16 byte aligned,
it caused movaps access misaligned(8 bytes not 16 bytes) address.

need to see why rsp is not aligned by 16

Co-authored-by: Yao Zhao <dragonlinux@gmail.com>
zhaoyao73 il y a 1 an
Parent
commit
e0b1d90940
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  1. 1 0
      build.rs

+ 1 - 0
build.rs

@@ -14,6 +14,7 @@ fn compile_libunwind() {
     cfg.flag("-fstrict-aliasing");
     cfg.flag("-fvisibility=hidden");
     cfg.flag("-funwind-tables");
+    cfg.flag("-mpreferred-stack-boundary=3");
     cfg.define("_LIBUNWIND_NO_HEAP", None);
     cfg.define("_LIBUNWIND_IS_BAREMETAL", None);
     cfg.define("_LIBUNWIND_IS_NATIVE_ONLY", None);