[GHC] #13970: Segmentation fault inside threadPaused

GHC ghc-devs at haskell.org
Wed Jul 19 21:07:39 UTC 2017


#13970: Segmentation fault inside threadPaused
-------------------------------------+-------------------------------------
        Reporter:  albertov          |                Owner:  (none)
            Type:  bug               |               Status:  patch
        Priority:  highest           |            Milestone:  8.2.1
       Component:  Runtime System    |              Version:  8.2.1-rc3
      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 bgamari):

 * priority:  normal => highest
 * status:  new => patch
 * milestone:   => 8.2.1


Comment:

 I found the issue. I neglected to consider that the stack-pointer
 adjustment in the `AP_STACK` entry code also accounted for the words that
 we would later copy from the applied stack to the current thread's stack.
 Since the stack-pointer adjustment happened before we attempted to
 blackhole the `AP_STACK` closure, there was a small chance that we would
 suspend the thread with uninitialized content on its stack (specifically,
 if another thread beat us to blackholing the closure).

 This should be fixed by Phab:D3760.

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


More information about the ghc-tickets mailing list