|
From: SourceForge.net <no...@so...> - 2010-11-29 21:43:22
|
Bugs item #3122505, was opened at 2010-11-29 12:04 Message generated for change (Comment added) made by sds You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101355&aid=3122505&group_id=1355 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: clisp Group: lisp error >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: https://www.google.com/accounts () >Assigned to: Sam Steingold (sds) Summary: LOAD does not close input file on abort Initial Comment: If a LOAD is aborted for some reason, the input file is not close. That can cause later errors when trying to open the file with different options. Here is a simplified version of the example that caused me some trouble: $ echo 1 > foo.lisp $ echo -e '\0' > foo.fas $ clisp -norc i i i i i i i ooooo o ooooooo ooooo ooooo I I I I I I I 8 8 8 8 8 o 8 8 I \ `+' / I 8 8 8 8 8 8 \ `-+-' / 8 8 8 ooooo 8oooo `-__|__-' 8 8 8 8 8 | 8 o 8 8 o 8 8 ------+------ ooooo 8oooooo ooo8ooo ooooo 8 Welcome to GNU CLISP 2.49 (2010-07-07) <http://clisp.cons.org/> Copyright (c) Bruno Haible, Michael Stoll 1992, 1993 Copyright (c) Bruno Haible, Marcus Daniels 1994-1997 Copyright (c) Bruno Haible, Pierpaolo Bernardi, Sam Steingold 1998 Copyright (c) Bruno Haible, Sam Steingold 1999-2000 Copyright (c) Sam Steingold, Bruno Haible 2001-2010 Type :h and hit Enter for context help. [1]> (load "foo.fas") *** - READ from #<INPUT BUFFERED FILE-STREAM CHARACTER #P"foo.fas" @1>: illegal character #\Null The following restarts are available: ABORT :R1 Abort main loop Break 1 [2]> :r1 [3]> (compile-file "foo.lisp") ** - Continuable Error OPEN: #<INPUT BUFFERED FILE-STREAM CHARACTER #P"foo.fas" @1> already points to file "/tmp/foo.fas", opening the file again for :OUTPUT may produce unexpected results If you continue (by typing 'continue'): Open the file anyway The following restarts are also available: ABORT :R1 Abort main loop Break 1 [4]> :r1 [5]> It was a surprise to me that the earlier failed LOAD interfered with the later attempt to use COMPILE-FILE. I expected the two operations to be fully independent. If LOAD closed its input file on abort, I think this problem would have been avoided. I'm using CLISP 2.49 built from source on 64-bit Linux. ---------------------------------------------------------------------- Comment By: Sam Steingold (sds) Date: 2010-11-29 16:43 Message: thank you for your bug report. the bug has been fixed in the CVS tree. you can either wait for the next release (recommended) or check out the current CVS tree (see http://clisp.cons.org) and build CLISP from the sources (be advised that between releases the CVS tree is very unstable and may not even build on your platform). ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101355&aid=3122505&group_id=1355 |