1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
Activate OPTION_STRICT_ALIGNMENT to avoid segfault
Access is not always aligned when gcc thinks it is, causing a segfault
when MOVDQA accesses a memory address that is not 16 byte aligned.
Upstream spinhawk commit:
https://github.com/rbowler/spinhawk/commit/a88567da805e945311a42306e7490086274bf8d5
Index: hercules-3.12/machdep.h
===================================================================
--- hercules-3.12.orig/machdep.h
+++ hercules-3.12/machdep.h
@@ -572,14 +572,10 @@ U32 *ptr4, val4, old4, new4;
#endif
/*-------------------------------------------------------------------
- * Decide if strict alignment is required
+ * Activate OPTION_STRICT_ALIGNMENT to generate different paths
+ * for non-aligned and aligned accesses in certain instructions
*-------------------------------------------------------------------*/
-#if !defined(OPTION_STRICT_ALIGNMENT) && !defined(OPTION_NO_STRICT_ALIGNMENT)
- #if !defined(_MSVC_) && !defined(_ext_ia32) && !defined(_ext_amd64) \
- && !defined(_ext_ppc)
- #define OPTION_STRICT_ALIGNMENT
- #endif
-#endif
+#define OPTION_STRICT_ALIGNMENT
/*-------------------------------------------------------------------
* fetch_hw_noswap and fetch_hw
|