
#12009: ASSERTION FAILED: file rts/LdvProfile.c, line 48 -------------------------------------+------------------------------------- Reporter: erikd | Owner: erikd Type: bug | Status: new Priority: normal | Milestone: 8.0.2 Component: Compiler | Version: 7.10.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Runtime crash | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by erikd): The following patch prevents the crash, but may result in in-correct heap profiling results: {{{#!diff diff --git a/rts/LdvProfile.c b/rts/LdvProfile.c index 1dfdc56..43a47aa 100644 --- a/rts/LdvProfile.c +++ b/rts/LdvProfile.c @@ -184,7 +184,14 @@ processNurseryForDead( void ) for (bd = MainCapability.r.rNursery->blocks; bd != NULL; bd = bd->link) { p = bd->start; while (p < bd->free) { + // The start of the block may be zero filled which we need to skip + // over. while (p < bd->free && !*p) p++; // skip slop + + // In debug mode, with sanity checking enabled, start of the block + // may be filled with `0xaa` so if we find it, we just break. + IF_DEBUG(sanity, if (*((StgWord32*)p) == 0xaaaaaaaa) break;); + if (p >= bd->free) break; p += processHeapClosureForDead((StgClosure *)p); } }}} Maybe we could print a warning about inaccuracey if debug sanity checking is on in profiling mode. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12009#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler