[MLton-commit] r6578
Matthew Fluet
fluet at mlton.org
Mon Apr 7 11:56:24 PDT 2008
Strengthen assert
----------------------------------------------------------------------
U mlton/trunk/runtime/gc/copy-thread.c
----------------------------------------------------------------------
Modified: mlton/trunk/runtime/gc/copy-thread.c
===================================================================
--- mlton/trunk/runtime/gc/copy-thread.c 2008-04-07 18:56:20 UTC (rev 6577)
+++ mlton/trunk/runtime/gc/copy-thread.c 2008-04-07 18:56:23 UTC (rev 6578)
@@ -45,12 +45,7 @@
fromStack = (GC_stack)(objptrToPointer(fromThread->stack, s->heap.start));
toThread = copyThread (s, fromThread, fromStack->used);
toStack = (GC_stack)(objptrToPointer(toThread->stack, s->heap.start));
- /* The following assert is no longer true, since alignment
- * restrictions can force the reserved to be slightly larger than
- * the used.
- */
- /* assert (toStack->reserved == toStack->used); */
- assert (toStack->reserved >= toStack->used);
+ assert (toStack->reserved == alignStackReserved (s, toStack->used));
leave (s);
if (DEBUG_THREADS)
fprintf (stderr, FMTPTR" = GC_copyCurrentThread\n", (uintptr_t)toThread);
@@ -71,12 +66,7 @@
fromStack = (GC_stack)(objptrToPointer(fromThread->stack, s->heap.start));
toThread = copyThread (s, fromThread, fromStack->used);
toStack = (GC_stack)(objptrToPointer(toThread->stack, s->heap.start));
- /* The following assert is no longer true, since alignment
- * restrictions can force the reserved to be slightly larger than
- * the used.
- */
- /* assert (toStack->reserved == toStack->used); */
- assert (toStack->reserved >= toStack->used);
+ assert (toStack->reserved == alignStackReserved (s, toStack->used));
leave (s);
if (DEBUG_THREADS)
fprintf (stderr, FMTPTR" = GC_copyThread ("FMTPTR")\n",
More information about the MLton-commit
mailing list