Fix bug by which current_disk_position was not reset from the last
authorGerald Jay Sussman <edu/mit/gjs>
Tue, 23 Jan 1990 03:00:23 +0000 (03:00 +0000)
committerGerald Jay Sussman <edu/mit/gjs>
Tue, 23 Jan 1990 03:00:23 +0000 (03:00 +0000)
gc-like operation.  When the files were swapped for fasdump, the
system might not lseek thinking that the pointer into the file was at
the correct place while it doesn't.  Typical failure would be
"Could not read into the scan buffer" since the file was shorter than
expected.

v7/src/microcode/bchmmg.c

index 9a0c26938352741fde57f0950ec0f0480edc9897..282e6668212a991ba586574e6ea7990d6443b77f 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/bchmmg.c,v 9.50 1989/11/30 03:03:35 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/bchmmg.c,v 9.51 1990/01/23 03:00:23 gjs Exp $
 
 Copyright (c) 1987, 1988, 1989 Massachusetts Institute of Technology
 
@@ -391,6 +391,8 @@ initialize_free_buffer()
   scan_position = -1;
   scan_buffer_bottom = gc_disk_buffer_2;
   scan_buffer_top = scan_buffer_bottom + GC_DISK_BUFFER_SIZE;
+  /* Force first write to do an lseek. */
+  current_disk_position = -1;
   return (free_buffer_bottom);
 }