
#11395: The via-C code generation backend is incompatible with gcc 5.3.1 on m68k
(ELF)
--------------------------------------------+------------------------------
Reporter: mkarcher | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.10.2
Resolution: | Keywords:
Operating System: Linux | Architecture: m68k
Type of failure: GHC doesn't work at all | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
--------------------------------------------+------------------------------
Comment (by slyfox):
I've also tried to build m68k crosscompiler
(using https://wiki.debian.org/M68k/sbuildQEMU to test produced binaries)
and noticed GHC has the issue similar to:
http://bugs.python.org/issue17237
m68k aligns structs containing integers and pointers to 2 bytes
(not 4 bytes). That makes StgClosure struct addresses look tagged
even if they are not.
An example of GHC's startup crash.
Test checks if untagging macro works:
{{{
Core was generated by `/tmp/a +RTS -Ds -Di -Dw -DG -Dg -Db -DS -Dt -Dp -Da
-Dl -Dm -Dz -Dc -Dr'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x80463b0a in LOOKS_LIKE_INFO_PTR_NOT_NULL (p=32858) at
includes/rts/storage/ClosureMacros.h:248
248 return (info->type != INVALID_OBJECT && info->type <
N_CLOSURE_TYPES) ? rtsTrue : rtsFalse;
(gdb) bt
#0 0x80463b0a in LOOKS_LIKE_INFO_PTR_NOT_NULL (p=32858) at
includes/rts/storage/ClosureMacros.h:248
#1 0x80463b46 in LOOKS_LIKE_INFO_PTR (p=32858) at
includes/rts/storage/ClosureMacros.h:253
#2 0x80463b6c in LOOKS_LIKE_CLOSURE_PTR (p=0x805aac6e