[commit: ghc] wip/T16185: Fix raiseAsync() UNDERFLOW_FRAME handling in profiling runtime (74cd4ec)

git at git.haskell.org git at git.haskell.org
Tue Jan 15 17:42:58 UTC 2019


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/T16185
Link       : http://ghc.haskell.org/trac/ghc/changeset/74cd4ec5d2f9321aad5db3285cb60d78f2562996/ghc

>---------------------------------------------------------------

commit 74cd4ec5d2f9321aad5db3285cb60d78f2562996
Author: Ömer Sinan Ağacan <omeragacan at gmail.com>
Date:   Thu Jan 10 11:55:25 2019 +0300

    Fix raiseAsync() UNDERFLOW_FRAME handling in profiling runtime
    
    UNDERFLOW_FRAMEs don't have profiling headers so we have to use the
    AP_STACK's function's CCS as the new frame's CCS.
    
    Fixes one of the many bugs caught by concprog001 (#15508).


>---------------------------------------------------------------

74cd4ec5d2f9321aad5db3285cb60d78f2562996
 rts/RaiseAsync.c                         | 3 +--
 testsuite/tests/concurrent/prog001/all.T | 3 ++-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/rts/RaiseAsync.c b/rts/RaiseAsync.c
index 72f5dff..f58f917 100644
--- a/rts/RaiseAsync.c
+++ b/rts/RaiseAsync.c
@@ -921,8 +921,7 @@ raiseAsync(Capability *cap, StgTSO *tso, StgClosure *exception,
                 ap->payload[i] = (StgClosure *)*sp++;
             }
 
-            SET_HDR(ap,&stg_AP_STACK_NOUPD_info,
-                    ((StgClosure *)frame)->header.prof.ccs /* ToDo */);
+            SET_HDR(ap,&stg_AP_STACK_NOUPD_info,stack->header.prof.ccs);
             TICK_ALLOC_SE_THK(WDS(words+1),0);
 
             stack->sp = sp;
diff --git a/testsuite/tests/concurrent/prog001/all.T b/testsuite/tests/concurrent/prog001/all.T
index 1476b4f..e319583 100644
--- a/testsuite/tests/concurrent/prog001/all.T
+++ b/testsuite/tests/concurrent/prog001/all.T
@@ -13,5 +13,6 @@
 # right now. --SDM 1/4/2010
 
 test('concprog001', [extra_files(['Arithmetic.hs', 'Converter.hs', 'Mult.hs', 'Stream.hs', 'Thread.hs', 'Trit.hs', 'Utilities.hs']),
-                     when(fast(), skip), only_ways(['threaded2'])],
+                     when(fast(), skip), only_ways(['threaded2']),
+                     run_timeout_multiplier(2)],
      multimod_compile_and_run, ['Mult', ''])



More information about the ghc-commits mailing list