rts/RetainerProfile: Dump closure type if push() fails
authorRyan Scott <ryan.gl.scott@gmail.com>
Sun, 25 Mar 2018 19:33:37 +0000 (15:33 -0400)
committerBen Gamari <ben@smart-cactus.org>
Sun, 25 Mar 2018 19:33:38 +0000 (15:33 -0400)
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

rts/RetainerProfile.c

index cad3bb4..42ddae3 100644 (file)
@@ -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;
     }