[MLton-commit] r4653
Matthew Fluet
MLton@mlton.org
Wed, 14 Jun 2006 05:17:43 -0700
Possible buffer overrun; I believe this accounts for a second-stage bootstrap error on OpenBSD, which compiles programs with stack guard
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/world.c
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/world.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/world.c 2006-06-14 01:39:58 UTC (rev 4652)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/world.c 2006-06-14 12:16:33 UTC (rev 4653)
@@ -52,11 +52,11 @@
* Instead, check return values, and propogate them up to SML for an exception.
*/
int saveWorldToFILE (GC_state s, FILE *f) {
- char buf[80];
+ char buf[128];
size_t len;
if (DEBUG_WORLD)
- fprintf (stderr, "saveWorld.\n");
+ fprintf (stderr, "saveWorldToFILE\n");
/* Compact the heap. */
performGC (s, 0, 0, TRUE, TRUE);
sprintf (buf,