rts: Fix RetainerProfile early return with TREC_CHUNK
authorDaniel Gröber <dxld@darkboxed.org>
Thu, 6 Jun 2019 06:14:19 +0000 (08:14 +0200)
committerMarge Bot <ben+marge-bot@smart-cactus.org>
Sun, 9 Jun 2019 22:48:38 +0000 (18:48 -0400)
When pop() returns with `*c == NULL` retainerProfile will immediately
return. All other code paths is pop() continue with the next stackElement
when this happens so it seems weird to me that TREC_CHUNK we would suddenly
abort everything even though the stack might still have elements left to
process.

rts/RetainerProfile.c

index a4b0639..360db37 100644 (file)
@@ -849,7 +849,7 @@ pop( StgClosure **c, StgClosure **cp, retainer *r )
             if (entry_no == ((StgTRecChunk *)se->c)->next_entry_idx) {
                 *c = NULL;
                 popOff();
-                return;
+                break;
             }
             entry = &((StgTRecChunk *)se->c)->entries[entry_no];
             if (field_no == 0) {