[GHC] #16094: panic! (the 'impossible' happened): for powerpc-unknown-linux getRegister(ppc): I64[I32[BaseReg + 812] + 64]

#16094: panic! (the 'impossible' happened): for powerpc-unknown-linux getRegister(ppc): I64[I32[BaseReg + 812] + 64] -------------------------------------+------------------------------------- Reporter: slyfox | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.3 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- On current HEAD ghc fails build on powerpc32: {{{ $ ./configure --target=powerpc-unknown-linux-gnu $ make ... "inplace/bin/ghc-stage1" -static -H32m -O -Wall -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist- ghcconstants/header -Irts -Irts/dist/build -DCOMPILING_RTS -DFS_NAMESPACE=rts -this-unit-id rts -dcmm-lint -i -irts -irts/dist/build -Irts/dist/build -irts/dist/build/./autogen -Irts/dist/build/./autogen -O2 -Wcpp-undef -Wnoncanonical- monad-instances -c rts/HeapStackCheck.cmm -o rts/dist/build/HeapStackCheck.o ghc-stage1: panic! (the 'impossible' happened) (GHC version 8.7.20181223 for powerpc-unknown-linux): getRegister(ppc) I64[I32[BaseReg + 812] + 64] Call stack: CallStack (from HasCallStack): callStackDoc, called at compiler/utils/Outputable.hs:1159:37 in ghc:Outputable pprPanic, called at compiler/nativeGen/PPC/CodeGen.hs:693:24 in ghc:PPC.CodeGen }}} {{{ $ inplace/bin/ghc-stage1 --info [("Project name","The Glorious Glasgow Haskell Compilation System") ,("GCC extra via C opts"," -fwrapv -fno-builtin") ,("C compiler command","powerpc-unknown-linux-gnu-gcc") ,("C compiler flags"," -fno-stack-protector") ,("C compiler link flags"," -fuse-ld=gold") ,("C compiler supports -no-pie","YES") ,("Haskell CPP command","powerpc-unknown-linux-gnu-gcc") ,("Haskell CPP flags","-E -undef -traditional") ,("ld command","powerpc-unknown-linux-gnu-ld.gold") ,("ld flags","") ,("ld supports compact unwind","YES") ,("ld supports build-id","YES") ,("ld supports filelist","NO") ,("ld is GNU ld","YES") ,("ar command","powerpc-unknown-linux-gnu-ar") ,("ar flags","q") ,("ar supports at file","YES") ,("ranlib command","powerpc-unknown-linux-gnu-ranlib") ,("touch command","touch") ,("dllwrap command","/bin/false") ,("windres command","/bin/false") ,("libtool command","libtool") ,("perl command","/usr/bin/perl") ,("cross compiling","YES") ,("target os","OSLinux") ,("target arch","ArchPPC") ,("target word size","4") ,("target has GNU nonexec stack","True") ,("target has .ident directive","True") ,("target has subsections via symbols","False") ,("target has RTS linker","YES") ,("Unregisterised","NO") ,("LLVM llc command","llc") ,("LLVM opt command","opt") ,("LLVM clang command","clang") ,("Project version","8.7.20181223") ,("Project Git commit id","bd8a6bde2ee73e599800137b9428a401bc105985") ,("Booter version","8.4.4") ,("Stage","1") ,("Build platform","x86_64-unknown-linux") ,("Host platform","x86_64-unknown-linux") ,("Target platform","powerpc-unknown-linux") ,("Have interpreter","YES") ,("Object splitting supported","YES") ,("Have native code generator","YES") ,("Support SMP","YES") ,("Tables next to code","YES") ,("RTS ways","l debug thr thr_debug thr_l thr_p dyn debug_dyn thr_dyn thr_debug_dyn l_dyn thr_l_dyn thr_debug_p debug_p") ,("RTS expects libdw","NO") ,("Support dynamic-too","YES") ,("Support parallel --make","YES") ,("Support reexported-modules","YES") ,("Support thinning and renaming package flags","YES") ,("Support Backpack","YES") ,("Requires unified installed package IDs","YES") ,("Uses package keys","YES") ,("Uses unit IDs","YES") ,("Dynamic by default","NO") ,("GHC Dynamic","NO") ,("GHC Profiled","NO") ,("Leading underscore","NO") ,("Debug on","False") ,("LibDir","/home/slyfox/dev/git/ghc-ppc/inplace/lib") ,("Global Package DB","/home/slyfox/dev/git/ghc- ppc/inplace/lib/package.conf.d") ] }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16094 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16094: panic! (the 'impossible' happened): for powerpc-unknown-linux getRegister(ppc): I64[I32[BaseReg + 812] + 64] -------------------------------------+------------------------------------- Reporter: slyfox | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by slyfox): * cc: trommler (added) Comment: I think it happens in '''stg_gc_noregs''' function on '''StgTSO_alloc_limit(CurrentTSO) `lt` (0::I64)''' expression. CCing Peter in case it's an obvious omission in CMM or NCG. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16094#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16094: panic! (the 'impossible' happened): for powerpc-unknown-linux getRegister(ppc): I64[I32[BaseReg + 812] + 64] ----------------------------------------+-------------------------------- Reporter: slyfox | Owner: trommler Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.3 Resolution: | Keywords: Operating System: Linux | Architecture: powerpc Type of failure: Building GHC failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ----------------------------------------+-------------------------------- Changes (by trommler): * owner: (none) => trommler * failure: None/Unknown => Building GHC failed * os: Unknown/Multiple => Linux * architecture: Unknown/Multiple => powerpc Comment: I think the panic is caused by a lack of 64-bit comparison operations on 32-bit PowerPC. The change in `stg_gc_noregs` is in changeset:d70b19bfb5ed79b22c2ac31e22f46782fc47a117. This commit has an implementation for X86 but not for PowerPC. I can provide a patch but I will need help with testing. There is no support for PowerPC 32-bit in openSUSE anymore :-( -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16094#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16094: panic! (the 'impossible' happened): for powerpc-unknown-linux getRegister(ppc): I64[I32[BaseReg + 812] + 64] ----------------------------------------+-------------------------------- Reporter: slyfox | Owner: trommler Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.3 Resolution: | Keywords: Operating System: Linux | Architecture: powerpc Type of failure: Building GHC failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | ----------------------------------------+-------------------------------- Changes (by trommler): * cc: hvr (added) Comment: I am copying @hvr for the AIX port, which is also 32-bit. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16094#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16094: panic! (the 'impossible' happened): for powerpc-unknown-linux getRegister(ppc): I64[I32[BaseReg + 812] + 64] -------------------------------------+------------------------------------- Reporter: slyfox | Owner: trommler Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 8.6.3 Resolution: | Keywords: Operating System: Linux | Architecture: powerpc Type of failure: Building GHC | Test Case: failed | Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/42 -------------------------------------+------------------------------------- Changes (by trommler): * status: new => patch * differential: => https://gitlab.haskell.org/ghc/ghc/merge_requests/42 Comment: The patch in [[https://gitlab.haskell.org/ghc/ghc/merge_requests/42| merge request 42]] has passed validate on powerpc64le Linux. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16094#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16094: panic! (the 'impossible' happened): for powerpc-unknown-linux getRegister(ppc): I64[I32[BaseReg + 812] + 64] -------------------------------------+------------------------------------- Reporter: slyfox | Owner: trommler Type: bug | Status: merge Priority: normal | Milestone: Component: Compiler | Version: 8.6.3 Resolution: | Keywords: Operating System: Linux | Architecture: powerpc Type of failure: Building GHC | Test Case: failed | Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/42 -------------------------------------+------------------------------------- Changes (by trommler): * status: patch => merge Comment: Fixed in changeset:ef57272e28f5047599249ae457609a079d8aebef. Could this be merged to the 8.6 branch as well? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16094#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16094: panic! (the 'impossible' happened): for powerpc-unknown-linux getRegister(ppc): I64[I32[BaseReg + 812] + 64] -------------------------------------+------------------------------------- Reporter: slyfox | Owner: trommler Type: bug | Status: merge Priority: normal | Milestone: Component: Compiler | Version: 8.6.3 Resolution: | Keywords: Operating System: Linux | Architecture: powerpc Type of failure: Building GHC | Test Case: failed | Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/42 -------------------------------------+------------------------------------- Comment (by bgamari): Is this really needed on `ghc-8.6`? ef57272e28f5047599249ae457609a079d8aebef doesn't apply cleanly as-is. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16094#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16094: panic! (the 'impossible' happened): for powerpc-unknown-linux getRegister(ppc): I64[I32[BaseReg + 812] + 64] -------------------------------------+------------------------------------- Reporter: slyfox | Owner: trommler Type: bug | Status: merge Priority: normal | Milestone: Component: Compiler | Version: 8.6.3 Resolution: | Keywords: Operating System: Linux | Architecture: powerpc Type of failure: Building GHC | Test Case: failed | Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/42 -------------------------------------+------------------------------------- Comment (by trommler): I will prepare a patch based on the 8.6 branch and push it to gitlab. If you decide to not merge the patch after all it is at least there for packagers to include in their packages. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16094#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16094: panic! (the 'impossible' happened): for powerpc-unknown-linux getRegister(ppc): I64[I32[BaseReg + 812] + 64] -------------------------------------+------------------------------------- Reporter: slyfox | Owner: trommler Type: bug | Status: merge Priority: normal | Milestone: Component: Compiler | Version: 8.6.3 Resolution: | Keywords: Operating System: Linux | Architecture: powerpc Type of failure: Building GHC | Test Case: failed | Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/42 -------------------------------------+------------------------------------- Comment (by bgamari): Did this ever happen, Peter? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16094#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16094: panic! (the 'impossible' happened): for powerpc-unknown-linux getRegister(ppc): I64[I32[BaseReg + 812] + 64] -------------------------------------+------------------------------------- Reporter: slyfox | Owner: trommler Type: bug | Status: merge Priority: normal | Milestone: Component: Compiler | Version: 8.6.3 Resolution: | Keywords: Operating System: Linux | Architecture: powerpc Type of failure: Building GHC | Test Case: failed | Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/42 -------------------------------------+------------------------------------- Comment (by trommler): Replying to [comment:8 bgamari]:
Did this ever happen, Peter? I got sidetracked with the port to FreeBSD. I will work on it tomorrow morning (European time).
-- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16094#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16094: panic! (the 'impossible' happened): for powerpc-unknown-linux getRegister(ppc): I64[I32[BaseReg + 812] + 64] -------------------------------------+------------------------------------- Reporter: slyfox | Owner: trommler Type: bug | Status: merge Priority: normal | Milestone: Component: Compiler | Version: 8.6.3 Resolution: | Keywords: Operating System: Linux | Architecture: powerpc Type of failure: Building GHC | Test Case: failed | Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/42 -------------------------------------+------------------------------------- Comment (by trommler): Merge request 130: https://gitlab.haskell.org/ghc/ghc/merge_requests/130 As with the fix for HEAD I tested on powerpc64le but not on 32-bit PowerPC. Sorry for the delay! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16094#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16094: panic! (the 'impossible' happened): for powerpc-unknown-linux getRegister(ppc): I64[I32[BaseReg + 812] + 64] -------------------------------------+------------------------------------- Reporter: slyfox | Owner: trommler Type: bug | Status: merge Priority: normal | Milestone: Component: Compiler | Version: 8.6.3 Resolution: | Keywords: Operating System: Linux | Architecture: powerpc Type of failure: Building GHC | Test Case: failed | Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/42 -------------------------------------+------------------------------------- Comment (by bgamari): Merged with db9b84c4154d7c6ab6bf4d1398246deef0107d6f. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16094#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16094: panic! (the 'impossible' happened): for powerpc-unknown-linux getRegister(ppc): I64[I32[BaseReg + 812] + 64] -------------------------------------+------------------------------------- Reporter: slyfox | Owner: trommler Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.6.3 Resolution: fixed | Keywords: Operating System: Linux | Architecture: powerpc Type of failure: Building GHC | Test Case: failed | Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/42 -------------------------------------+------------------------------------- Changes (by bgamari): * status: merge => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16094#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC