[GHC] #15300: Unboxed Sums Crash

GHC ghc-devs at haskell.org
Thu Jul 12 09:38:37 UTC 2018


#15300: Unboxed Sums Crash
-------------------------------------+-------------------------------------
        Reporter:  andrewthad        |                Owner:  osa1
            Type:  bug               |               Status:  new
        Priority:  highest           |            Milestone:  8.6.1
       Component:  Compiler          |              Version:  8.5
      Resolution:                    |             Keywords:  UnboxedSums
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by osa1):

 Confirmed that the transformation above is the problem. With this
 transformation the unarised expression:

 {{{
 Main.$w$j
     GHC.Prim.void#
     us_gcvd
     us_gcve
     us_gcvf
     us_gcvg
     us_gcvh
     1#
     us_gcvj;
 }}}

 becomes

 {{{
 Main.$w$j
     GHC.Prim.void#
     us_gcvd
     us_gcve
     us_gcvf
     us_gcvg
     us_gcvh
     us_gcvi
     us_gcvj
     us_gcvk
     us_gcvl;
 }}}

 We now pass more arguments to `$w$j`!

 I had spent some time debugging this in the assembly level and found out
 that `stg_ap_n` is trying to apply a non-pointer to a constructor. If
 we're passing more arguments to function or a constructor than this kind
 of error makes sense.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15300#comment:14>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list