[commit: ghc] master: rts/RetainerProfile: Dump closure type if push() fails (9a00bfb)

git at git.haskell.org git at git.haskell.org
Mon Mar 26 00:12:04 UTC 2018


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/9a00bfba122cd7138892c934c9cc3376dc2abe98/ghc

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

commit 9a00bfba122cd7138892c934c9cc3376dc2abe98
Author: Ryan Scott <ryan.gl.scott at gmail.com>
Date:   Sun Mar 25 15:33:37 2018 -0400

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


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

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

diff --git a/rts/RetainerProfile.c b/rts/RetainerProfile.c
index cad3bb4..42ddae3 100644
--- a/rts/RetainerProfile.c
+++ b/rts/RetainerProfile.c
@@ -631,7 +631,7 @@ push( StgClosure *c, retainer c_child_r, StgClosure **first_child )
     case IND:
     case INVALID_OBJECT:
     default:
-        barf("Invalid object *c in push()");
+        barf("Invalid object *c in push(): %d", get_itbl(c)->type);
         return;
     }
 



More information about the ghc-commits mailing list