home *** CD-ROM | disk | FTP | other *** search
- In article <3468@hplabsz.HPL.HP.COM> mayer@hplabs.hp.com (Niels Mayer) writes:
- >It looks like garbage collection is trashing a pointer somewhere when using
- >make-string-input-stream running read-char on that stream. After doing a
- >bunch of read-chars on that stream, I get an "error: bad stream" message.
- >This happens more often right after you start up xlisp, and less frequently
- >upon subsequent garbage collections.
-
- Someone inside HP kindly mailed me an archive of the last year of
- comp.lang.lisp.x, and inside that archive, I found the following fix:
-
- Note 58 two bugs with unnamed streams in xlisp 2.0
- nikkie@dutesta.UUCP (Paul A.W. van Niekerk) 7:13 am Dec 16, 1988
-
- I discovered two bugs in my copy of xlisp 2.0 concerning unnamed streams.
- The bugs + fixes follow.
-
- 1. Unnamed streams never survive a garbage collection.
- Fix: in xldmem.c change in function mark the line:
- if ((type = ntype(this)) == CONS) {
- to
- if ((type = ntype(this)) == CONS || type == USTREAM) {
-
- 2. (format nil ...) does not protect the unnamed stream it creates, it will
- vanish during a GC.
- Fix: in xlfio.c add to function xformat the lines:
- xlsave1(val);
- ...
- xlpop();
-
- Now USTREAMS seem to work fine.
- Paul van Niekerk.
- --
- Paul A.W. van Niekerk | All standard
- Delft University of Technology | disclaimers apply ...
-
- -------------------------------------------------------------------------------
- Niels Mayer -- hplabs!mayer -- mayer@hplabs.hp.com
- Human-Computer Interaction Department
- Hewlett-Packard Laboratories
- Palo Alto, CA.
- *
-
-
-