[GHC] #15300: Unboxed Sums Crash

GHC ghc-devs at haskell.org
Fri Jun 22 07:18:47 UTC 2018


#15300: Unboxed Sums Crash
-------------------------------------+-------------------------------------
        Reporter:  andrewthad        |                Owner:  (none)
            Type:  task              |               Status:  new
        Priority:  normal            |            Milestone:  8.6.1
       Component:  Compiler          |              Version:  8.4.3
      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):

 Thanks for reporting. I managed to reproduce this with GHC HEAD.

 > I think the program fails in the final GC that runs right before the
 program
 > terminates. We can see that it produces a correct result of
 (Nothing,Just
 > "\rhas\narrived"), but something on the heap has definitely been
 corrupted.

 This program does not do any GC at all. Try this:

 {{{
 $ gdb --args ./eol
 Reading symbols from ./eol...done.
 >>> break GarbageCollect
 Breakpoint 1 at 0x8b3ca7: file rts/sm/GC.c, line 224.
 >>> r
 }}}

 you'll see that the breakpoint is never triggered. So this is definitely a
 code
 generation bug.

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


More information about the ghc-tickets mailing list