[commit: ghc] master: rts: Set unwind information for remaining stack frames (760b9a3)

git at git.haskell.org git at git.haskell.org
Fri Sep 22 00:13:20 UTC 2017


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/760b9a363cd4e9287a05b23c74357db0e815bdf3/ghc

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

commit 760b9a363cd4e9287a05b23c74357db0e815bdf3
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Thu Sep 21 18:04:03 2017 -0400

    rts: Set unwind information for remaining stack frames
    
    Reviewers: austin, erikd, simonmar
    
    Reviewed By: simonmar
    
    Subscribers: rwbarton, thomie
    
    Differential Revision: https://phabricator.haskell.org/D3985


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

760b9a363cd4e9287a05b23c74357db0e815bdf3
 rts/Exception.cmm       | 3 +++
 rts/PrimOps.cmm         | 1 +
 rts/StgMiscClosures.cmm | 3 ++-
 3 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/rts/Exception.cmm b/rts/Exception.cmm
index a27227d..4970aa2 100644
--- a/rts/Exception.cmm
+++ b/rts/Exception.cmm
@@ -110,6 +110,7 @@ INFO_TABLE_RET(stg_unmaskAsyncExceptionszh_ret, RET_SMALL, W_ info_ptr)
 INFO_TABLE_RET(stg_maskAsyncExceptionszh_ret, RET_SMALL, W_ info_ptr)
     return (P_ ret)
 {
+    unwind Sp = Sp + WDS(1);
     StgTSO_flags(CurrentTSO) =
        %lobits32(
          TO_W_(StgTSO_flags(CurrentTSO))
@@ -122,6 +123,7 @@ INFO_TABLE_RET(stg_maskAsyncExceptionszh_ret, RET_SMALL, W_ info_ptr)
 INFO_TABLE_RET(stg_maskUninterruptiblezh_ret, RET_SMALL, W_ info_ptr)
     return (P_ ret)
 {
+    unwind Sp = Sp + WDS(1);
     StgTSO_flags(CurrentTSO) =
        %lobits32(
         (TO_W_(StgTSO_flags(CurrentTSO))
@@ -430,6 +432,7 @@ section "data" {
 INFO_TABLE_RET(stg_raise_ret, RET_SMALL, W_ info_ptr, P_ exception)
     return (P_ ret)
 {
+    unwind Sp = Sp + WDS(2);
     W_[no_break_on_exception] = 1;
     jump stg_raisezh (exception);
 }
diff --git a/rts/PrimOps.cmm b/rts/PrimOps.cmm
index 3d4bea4..6047b49 100644
--- a/rts/PrimOps.cmm
+++ b/rts/PrimOps.cmm
@@ -1004,6 +1004,7 @@ INFO_TABLE_RET(stg_catch_retry_frame, CATCH_RETRY_FRAME,
                                         alt_code))
     return (P_ ret)
 {
+    unwind Sp = Sp + SIZEOF_StgCatchRetryFrame;
     W_ r;
     gcptr trec, outer, arg;
 
diff --git a/rts/StgMiscClosures.cmm b/rts/StgMiscClosures.cmm
index 88371f2..361989d 100644
--- a/rts/StgMiscClosures.cmm
+++ b/rts/StgMiscClosures.cmm
@@ -26,7 +26,7 @@ INFO_TABLE_RET (stg_stack_underflow_frame, UNDERFLOW_FRAME,
                 W_ info_ptr, P_ unused)
     /* no args => explicit stack */
 {
-    unwind UnwindReturnReg = return;
+    unwind Sp = W_[Sp + WDS(2)];
 
     W_ new_tso;
     W_ ret_off;
@@ -61,6 +61,7 @@ INFO_TABLE_RET (stg_restore_cccs, RET_SMALL, W_ info_ptr, W_ cccs)
 INFO_TABLE_RET (stg_restore_cccs_eval, RET_SMALL, W_ info_ptr, W_ cccs)
     return (P_ ret)
 {
+    unwind Sp = Sp + WDS(2);
 #if defined(PROFILING)
     CCCS = cccs;
 #endif



More information about the ghc-commits mailing list