Commit 9b65ae69 authored by Ben Gamari's avatar Ben Gamari 🐢 Committed by Ben Gamari

rts: Turn ASSERT in LDV_recordDead into a normal if

As reported in #15382 the `ASSERT(ctr != NULL)` is currently getting routinely
hit during testsuite runs. While this is certainly a bug I would far prefer
getting a proper error message than a segmentation fault. Consequently I'm
turning the `ASSERT` into a proper `if` so we get a proper error in non-debug
builds.
parent 7bfc1e81
......@@ -201,7 +201,9 @@ LDV_recordDead( const StgClosure *c, uint32_t size )
} else {
id = closureIdentity(c);
ctr = lookupHashTable(censuses[t].hash, (StgWord)id);
ASSERT( ctr != NULL );
if (ctr == NULL)
barf("LDV_recordDead: Failed to find counter for closure %p", c);
ctr->c.ldv.void_total += size;
ctr = lookupHashTable(censuses[era].hash, (StgWord)id);
if (ctr == NULL) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment