Răsfoiți Sursa

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 4 luni în urmă
părinte
comite
e0b1d90940
1 a modificat fișierele cu 1 adăugiri și 0 ștergeri
  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);