diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-04-20 19:05:14 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-04-20 19:05:14 -0700 |
commit | 2dd44160458c9d8293faddf5156b9cef08eea7c0 (patch) | |
tree | 7ce034b4147f721b42ff1281772878faf75d825f | |
parent | 8f3fc9e55be629c18e73e674555004c87004cfec (diff) | |
download | txr-2dd44160458c9d8293faddf5156b9cef08eea7c0.tar.gz txr-2dd44160458c9d8293faddf5156b9cef08eea7c0.tar.bz2 txr-2dd44160458c9d8293faddf5156b9cef08eea7c0.zip |
clang+amd4: fix stack alignment for continuations.
* unwind.h (UW_FRAME_ALIGN): Define on __amd64__, if compiled
by __clang__. This is because MMX instructions are used for
manipulating the stack which require 16 byte alignment.
This was discovered as a bus error crash on OpenBSD in the
tests/012/cont.tl test case, acessing otherwise perfectly
valid memory. The faulting address was only 8 byte aligned,
not 16.
-rw-r--r-- | unwind.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -302,7 +302,7 @@ struct uw_eval { #endif -#if __aarch64__ +#if __aarch64__ || (__clang__ && __amd64__) #define UW_FRAME_ALIGN __attribute__ ((aligned (16))) #else #define UW_FRAME_ALIGN |