Number: 205

Date: 20-Mar-84 10':28':36

Submitter: le.pasa

Source: Christopher Schmidt <SCHMIDT@SUMEX-AIM.ARPA>

Subject: READ from strings leaves a stream in \OPENFILES for each call!

Assigned To:  Masinter

Attn: Release

Status: Fixed

In/By: 

Problem Type: Bug

Impact: 

Difficulty: Moderate

Frequency: 

Priority: Hopefully

System: Language Support

Subsystem: Read and Print

Machine: 

Disk: 

Lisp Version: 14 Jan 84

Source Files: 

Microcode Version: 

Memory Size: 

File Server: 

Server Software Version: 

Disposition: (tl':  added more comments Mar 20, 1984 16':28':50) (mjs 3/21 Problem Type': ← Bug)

Description: '
Received': from SUMEX-AIM.ARPA by PARC-MAXC.ARPA; 15 MAR 84 11':08':08 PST'
Date': Thu, 15 Mar 84 11':07':42 PST'
From': Christopher Schmidt <SCHMIDT@SUMEX-AIM.ARPA>'
Subject': Carol bug (14 Jan 84)'
To': 1100support.pasa'
cc': Lane@SUMEX-AIM.ARPA'
'
	In our prerelease of Carol (of 14 Jan 84) we''ve noticed that'
there is a bug in READ of a string, such that (READ "(THIS AND THAT)")'
leaves a stream in \OPENFILES for each call!  Try doing (READ "(THIS'
AND THAT)") and (OPENP).  Doing a CLOSEF of the string seems to work,'
but it seems a bit silly.'
--Christopher'
'
[lmm': This is an artifact of a change that KAPLAN made to make reading from strings not gobble up the string and cache the stream. Perhaps another fix which created a stream on the fly each time you did the READ but then ate up the characters would be better. Didn''t we used to have a one-level cache that just kept the stream around for the LAST string we had read from?]'
'


Workaround: (lmm': use OPENSTRINGSTREAM)

Test Case: 

Edit-By: Masinter

Edit-Date: 17-Aug-84 22':54':42