[commit: ghc] wip/ghc-8.6-merge: Fix raiseAsync() UNDERFLOW_FRAME handling in profiling runtime (cf5b5a7)

git at git.haskell.org git at git.haskell.org
Sat Feb 9 18:22:30 UTC 2019


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

On branch  : wip/ghc-8.6-merge
Link       : http://ghc.haskell.org/trac/ghc/changeset/cf5b5a74564a61aeb636a88d68732b913306d101/ghc

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

commit cf5b5a74564a61aeb636a88d68732b913306d101
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).
    
    (cherry picked from commit 74cd4ec5d2f9321aad5db3285cb60d78f2562996)


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

cf5b5a74564a61aeb636a88d68732b913306d101
 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 b08acc4..ddd6d39 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