[GHC] #13916: Optimizations create run time seg faults

GHC ghc-devs at haskell.org
Sat Jul 8 21:33:22 UTC 2017


#13916: Optimizations create run time seg faults
-------------------------------------+-------------------------------------
        Reporter:  newthin           |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.2
  (CodeGen)                          |
      Resolution:                    |             Keywords:  optimization
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  Runtime crash     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by bgamari):

 So to recap, `takeMVar` is getting passed a pointer that does not appear
 to point to an `MVar` closure. There are two reasons for this,

 1. the closure was once an `MVar` but overwritten by someone since it was
 allocated (implying that whatever code overwrote the closure is at fault)
 2. the pointer is invalid (implying that some parent in the callgraph may
 be at fault, or they took the pointer from another closure which itself
 was trampled on by someone else).

 I believe I've ruled out (1): watching the closure's memory suggests that
 there never was an `MVar` closure at this address.

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


More information about the ghc-tickets mailing list