[commit: ghc] master: rts/RetainerProfile: Dump closure type if pop() fails (2bacf6f)

git at git.haskell.org git at git.haskell.org
Tue Aug 21 22:57:01 UTC 2018


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/2bacf6f8842d8e1288917e358ed41e4c61b7948e/ghc

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

commit 2bacf6f8842d8e1288917e358ed41e4c61b7948e
Author: Ryan Scott <ryan.gl.scott at gmail.com>
Date:   Tue Aug 21 16:04:45 2018 -0400

    rts/RetainerProfile: Dump closure type if pop() fails
    
    While investigating #15529, I noticed that the `barf`ed
    error message in `pop()` doesn't print out the closure type that
    causes it to crash. Let's do so.
    
    Reviewers: bgamari, erikd, simonmar
    
    Reviewed By: bgamari
    
    Subscribers: rwbarton, carter
    
    GHC Trac Issues: #15529
    
    Differential Revision: https://phabricator.haskell.org/D5072


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

2bacf6f8842d8e1288917e358ed41e4c61b7948e
 rts/RetainerProfile.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rts/RetainerProfile.c b/rts/RetainerProfile.c
index 6a0af21..9458b13 100644
--- a/rts/RetainerProfile.c
+++ b/rts/RetainerProfile.c
@@ -897,7 +897,7 @@ pop( StgClosure **c, StgClosure **cp, retainer *r )
         case IND:
         case INVALID_OBJECT:
         default:
-            barf("Invalid object *c in pop()");
+            barf("Invalid object *c in pop(): %d", get_itbl(se->c)->type);
             return;
         }
     } while (true);



More information about the ghc-commits mailing list