MPS issue job003692

TitleMPS deep checking fails at bootstrap
Statusclosed
Priorityoptional
Assigned userRichard Brooksby
OrganizationRavenbrook
DescriptionThe MPS defines several levels of internal checking, described in check.h. However, we rarely test with the deepest level, and compiling with CHECKLEVEL=CheckLevelDEEP causes an assertion during bootstrap. Almost certainly does not indicate a bug, but means that deep checking isn't useful until it's fixed.
AnalysisSet CHECKLEVEL=CheckLevelDEEP and hack away at each assertion.
How foundinspection
EvidenceJust run any test with CHECKLEVEL=CheckLevelDEEP
Created byRichard Brooksby
Created on2014-03-11 13:01:50
Last modified byGareth Rees
Last modified on2014-03-24 09:17:12
History2014-03-11 RB Created.

Fixes

Change Effect Date User Description
184924 closed 2014-03-20 23:37:02 Gareth Rees Fix some CheckLevelDEEP assertions:
1. In GlobalsPrepareToDestroy, set arenaGlobals->defaultChain to NULL before calling ChainDestroy, to avoid a failed ChainCheck inside ControlFree.
2. In GlobalsPrepareToDestroy, set arenaGlobals->lock to NULL after destroying it, to avoid a failed LockCheck inside ControlFree.
3. In TraceIdMessagesCreate, set tsMessage[ti] and tMessage[ti] together to avoid a failed TraceIdMessagesCheck inside traceMessageInit.
4. In TracePostStartMessage, set tsMessage[ti] to NULL before calling MessagePost, to avoid a failed TraceStartMessageCheck inside ControlFree.
5. Ditto for TracePostMessage and tMessage[ti].