[m-rev.] diff: Fix a threadscope profiling bug.
Paul Bone
pbone at csse.unimelb.edu.au
Mon May 24 16:36:34 AEST 2010
Fix a bug in the Mercury runtime's threadscope support that could cause a
buffer overrun.
runtime/mercury_threadscope.c:
As above.
Index: runtime/mercury_threadscope.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_threadscope.c,v
retrieving revision 1.6
diff -u -p -b -r1.6 mercury_threadscope.c
--- runtime/mercury_threadscope.c 20 Mar 2010 10:15:51 -0000 1.6
+++ runtime/mercury_threadscope.c 24 May 2010 02:49:38 -0000
@@ -381,7 +381,7 @@ enough_room_for_variable_size_event(
return (buffer->MR_tsbuffer_pos + length +
event_type_sizes[MR_TS_EVENT_BLOCK_MARKER] +
((2 + 8) * 2) + 2) /* (EventType, Time) * 2 + StringLength */
- - MR_TS_BUFFERSIZE;
+ < MR_TS_BUFFERSIZE;
}
/*
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 489 bytes
Desc: Digital signature
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20100524/605b6157/attachment.sig>
More information about the reviews
mailing list