Opened 2 years ago

Last modified 6 months ago

#11773 new bug

linux/powepc : ghc-stage1 segfaults when building unregisterised

Reported by: erikd Owned by: erikd
Priority: normal Milestone:
Component: Compiler Version: 8.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: powerpc
Type of failure: Building GHC failed Test Case:
Blocked By: Blocking:
Related Tickets: #11784 Differential Rev(s):
Wiki Page:


Building unregisterised to test code paths that don't get tested in the registerised compile mode.

The segfault:

"inplace/bin/ghc-stage1" -static  -O -H64m -Wall -Iincludes -Iincludes/dist \
  -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstants/header \
  -Irts -Irts/dist/build -DCOMPILING_RTS -this-unit-id rts -optc-DNOSMP \
  -dcmm-lint -i -irts -irts/dist/build -irts/dist/build/autogen \
  -Irts/dist/build -Irts/dist/build/autogen -O2 -Wnoncanonical-monad-instances \
  -c rts/StgStartup.cmm -o rts/dist/build/StgStartup.o

seems to occur on powerpc, but not on x86_64 or armhf.

Change History (6)

comment:1 Changed 2 years ago by erikd

If I add -v2 to this command line I get:

Created temporary directory: /tmp/ghc8899_0
*** C Compiler:
*** ParseCmm [/tmp/ghc8899_0/ghc_1.cmmcpp]:
!!! ParseCmm [/tmp/ghc8899_0/ghc_1.cmmcpp]: finished in 0.61 milliseconds,
                                            allocated 1.019 megabytes
*** Deleting temp files:
Warning: deleting non-existent /tmp/ghc8899_0/ghc_4.c
Warning: deleting non-existent /tmp/ghc8899_0/ghc_3.hc
*** Deleting temp dirs:
ghc-stage1: panic! (the 'impossible' happened)
  (GHC version 8.1.20160330 for powerpc-unknown-linux):
        hscCmmFile: no_mod

comment:2 Changed 2 years ago by erikd

GHC 7.10 builds ungreisterised just fine.

I then managed to track down the commit that introduced this, 4905b83a2d. Need to go over that with a fine toothed comb.

comment:3 Changed 2 years ago by erikd

comment:4 Changed 22 months ago by bgamari


This will likely not happen for 8.2; bumping to 8.4.

comment:5 Changed 8 months ago by bgamari


This ticket won't be resolved in 8.4; remilestoning for 8.6. Do holler if you are affected by this or would otherwise like to work on it.

comment:6 Changed 6 months ago by bgamari

Milestone: 8.6.1

erikd, any word on this?

Note: See TracTickets for help on using tickets.