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].
Copied from Perforce
Change: 184924
ServerID: perforce.ravenbrook.com
.whybuf.nul: the last char in the array must be NUL (even if there is another NUL earlier in the buffer).
Message Delete functions set sig to invalid, and call MessageFinish.
TraceIdMessagesDestroy uses message Delete functions.
Copied from Perforce
Change: 167003
ServerID: perforce.ravenbrook.com
In low memory situations, ControlAlloc may be unable to allocate
memory for GC messages. This needs to work flawlessly, but is
hard to test. To simulate it for testing purposes, do macro-magic
in traceanc.c, before the definition of TraceIdMessagesCreate.
Test all designed behaviour of TraceIdMessagesCreate failing.
See <design/message-gc#lifecycle>.
Copied from Perforce
Change: 166959
ServerID: perforce.ravenbrook.com
re-create them immediately after a trace sends its last message.
Store them, one per TraceId, in ArenaStruct. Cope correctly if they
cannot be created (ControlAlloc fails). Destroy them correctly on
mps_arena_destroy. See job001989 and design/message-gc#lifecycle
(not yet written).
Copied from Perforce
Change: 166918
ServerID: perforce.ravenbrook.com
is not essential to Trace objects. (p4 integ'd from trace.c to
preserve ancestry).
Copied from Perforce
Change: 166900
ServerID: perforce.ravenbrook.com