From c6b8b954cfb0dc859512acfcb60ba69dd4dd4a31 Mon Sep 17 00:00:00 2001 From: Gerald Jay Sussman Date: Tue, 23 Jan 1990 03:00:23 +0000 Subject: [PATCH] Fix bug by which current_disk_position was not reset from the last 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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/v7/src/microcode/bchmmg.c b/v7/src/microcode/bchmmg.c index 9a0c26938..282e66682 100644 --- a/v7/src/microcode/bchmmg.c +++ b/v7/src/microcode/bchmmg.c @@ -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); } -- 2.25.1