
#15482: the_gc_thread variable from GC.c is not aligned to 64 -------------------------------------+------------------------------------- Reporter: arrowd | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 Keywords: | Operating System: Unknown/Multiple Architecture: x86_64 | Type of failure: None/Unknown (amd64) | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- When compiling GHC with clang and -march=native flag, the compiler emits vmovaps instruction with unaligned operand for this code: {{{ * thread #1, name = 'ghc-pkg', stop reason = signal SIGBUS: hardware error frame #0: 0x0000000804e476c6 libHSrts-ghc8.0.2.so`initGcThreads [inlined] new_gc_thread(n=0) at GC.c:818 815 ws->todo_q = newWSDeque(128); 816 ws->todo_overflow = NULL; 817 ws->n_todo_overflow = 0; -> 818 ws->todo_large_objects = NULL; 819 820 ws->part_list = NULL; 821 ws->n_part_blocks = 0; }}} Research done by another FreeBSD developer suggested that this is due {{{ StgWord8 the_gc_thread[sizeof(gc_thread) + 64 * sizeof(gen_workspace)]; }}} not being aligned to 64 bytes, because struct gc_thread have no alignment specifier. Detailed information can be found in FreeBSD bugzilla: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=226059 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15482 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler