aboutsummaryrefslogtreecommitdiffstats
path: root/mps/code
diff options
context:
space:
mode:
authorRichard Kistruck2006-12-12 09:02:42 +0000
committerRichard Kistruck2006-12-12 09:02:42 +0000
commit8ff037ffff6bb9bdb6cb5cc2e3adfd0c5dca1246 (patch)
tree3039004e105fb9067424291e5e70a1e3fb06146e /mps/code
parent02a7a9bc52582e19c6d5010d7691d7e6794ee21b (diff)
downloademacs-8ff037ffff6bb9bdb6cb5cc2e3adfd0c5dca1246.tar.gz
emacs-8ff037ffff6bb9bdb6cb5cc2e3adfd0c5dca1246.zip
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
Diffstat (limited to 'mps/code')
-rw-r--r--mps/code/trace.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/mps/code/trace.c b/mps/code/trace.c
index aa853501569..593f4babdcf 100644
--- a/mps/code/trace.c
+++ b/mps/code/trace.c
@@ -1544,8 +1544,15 @@ void TraceStart(Trace trace, double mortality, double finishingTime)
1544 arena = trace->arena; 1544 arena = trace->arena;
1545 1545
1546 message = TraceStartMessageMessage(&trace->startMessage); 1546 message = TraceStartMessageMessage(&trace->startMessage);
1547 /* Check message is not on queue. If it _is_ then client 1547 /* Attempt to re-use message.
1548 must have not read it yet. */ 1548 * @@@@ This is not done safely, because we fail to record
1549 * whether the client has discarded the message yet. See
1550 * design/message/#lifecycle. We might over-write message
1551 * fields the client is still looking at.
1552 * @@@@ Half-way measure: check message is not on queue.
1553 * If it _is_ then client has not read the last Post yet, so
1554 * we just silently drop the message for this TraceStart.
1555 */
1549 if(!MessageOnQueue(message)) { 1556 if(!MessageOnQueue(message)) {
1550 MessagePost(arena, message); 1557 MessagePost(arena, message);
1551 } 1558 }