1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-10 01:34:36 -08:00

Mps gcgenmsg: (comment only)

TraceStart may overwrite fields of in-use message.
TraceStart may silently drop the TraceStartMessage.

Copied from Perforce
 Change: 161203
 ServerID: perforce.ravenbrook.com
This commit is contained in:
Richard Kistruck 2006-12-12 09:02:42 +00:00
parent 02a7a9bc52
commit 8ff037ffff

View file

@ -1544,8 +1544,15 @@ void TraceStart(Trace trace, double mortality, double finishingTime)
arena = trace->arena;
message = TraceStartMessageMessage(&trace->startMessage);
/* Check message is not on queue. If it _is_ then client
must have not read it yet. */
/* Attempt to re-use message.
* @@@@ This is not done safely, because we fail to record
* whether the client has discarded the message yet. See
* design/message/#lifecycle. We might over-write message
* fields the client is still looking at.
* @@@@ Half-way measure: check message is not on queue.
* If it _is_ then client has not read the last Post yet, so
* we just silently drop the message for this TraceStart.
*/
if(!MessageOnQueue(message)) {
MessagePost(arena, message);
}