Andreas Klebinger pushed to branch wip/andreask/fix-prof-segv at Glasgow Haskell Compiler / GHC

Commits:

2 changed files:

Changes:

  • changelog.d/T27123.md
    1 1
     section: compiler
    
    2 2
     synopsis: Fix two crashes that could happen in a multithreaded setting when profiling.
    
    3
    -description: There where two bugs that could cause occasional segfaults or crashes with
    
    3
    +description: There were two bugs that could cause occasional segfaults or crashes with
    
    4 4
     an `PAP object entered` error when profiling. They only happened when two threads
    
    5 5
     where racing to evaluate the same thunk, and specific GC timings.
    
    6 6
     mrs: !16214
    

  • rts/Apply.cmm
    ... ... @@ -215,7 +215,7 @@ again:
    215 215
                 // STK_CHK_GEN() did a GC then the closure we're looking
    
    216 216
                 // at may have changed, e.g. a THUNK_SELECTOR may have
    
    217 217
                 // been evaluated by the GC.
    
    218
    -            // We always reload reload the info pointer now. And if
    
    218
    +            // We always reload the info pointer now. And if
    
    219 219
                 // the closure type changed we need to take a different case
    
    220 220
                 // alt altogether so we retry from the start in that case.
    
    221 221