From d6e3b39e1303da0c771f76d8be89baab5909221c Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Fri, 10 Jun 1988 07:58:04 +0000 Subject: [PATCH] Fix nasty bug in tty interrupt code. The symptom of the bug was: typing ^G while the microcode was in `TYI_Immediate' caused the next read from the tty to get EOF; subsequently Scheme signalled TERM_EOF. The problem was that there was local storage in `TYI_Immediate', which contained trash after the interrupt performed a `longjmp' back into the procedure. According to the definition of `setjmp', it is illegal to depend on such local storage. We are unlucky in that only a little bit of the local storage was affected so it took a long time to notice this problem. This was fixed by introducing a fluid-binding mechanism to allocate and deallocate local state. There may be a problem with the interaction between `longjmp' and this mechanism. If we `longjmp' past the deallocation routine the world will be messed up. --- v7/src/microcode/version.h | 4 ++-- v8/src/microcode/version.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/v7/src/microcode/version.h b/v7/src/microcode/version.h index b39c700a3..669729a71 100644 --- a/v7/src/microcode/version.h +++ b/v7/src/microcode/version.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/version.h,v 10.41 1988/06/08 16:10:06 jrm Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/version.h,v 10.42 1988/06/10 07:58:04 cph Exp $ Copyright (c) 1988 Massachusetts Institute of Technology @@ -46,7 +46,7 @@ MIT in each case. */ #define VERSION 10 #endif #ifndef SUBVERSION -#define SUBVERSION 41 +#define SUBVERSION 42 #endif #ifndef UCODE_TABLES_FILENAME diff --git a/v8/src/microcode/version.h b/v8/src/microcode/version.h index 9fc9d5944..138eedb65 100644 --- a/v8/src/microcode/version.h +++ b/v8/src/microcode/version.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/version.h,v 10.41 1988/06/08 16:10:06 jrm Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/version.h,v 10.42 1988/06/10 07:58:04 cph Exp $ Copyright (c) 1988 Massachusetts Institute of Technology @@ -46,7 +46,7 @@ MIT in each case. */ #define VERSION 10 #endif #ifndef SUBVERSION -#define SUBVERSION 41 +#define SUBVERSION 42 #endif #ifndef UCODE_TABLES_FILENAME -- 2.25.1