Read error in file LOADed in EVAL-WHEN causes failed AVER
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Medium
|
Unassigned |
Bug Description
The following setup causes an error.
failer.lisp is some file that causes a read error - for example it only contains an open parenthesis.
trash.lisp is set up to load failer.lisp at compile and load times, e.g. it might contain:
(eval-when (:compile-toplevel :load-toplevel) (load "failer.lisp"))
Compiling foo.lisp results in the following error:
failed AVER: (NULL CURRENT)
This is probably a bug in SBCL itself. (Alternatively, SBCL might have
been corrupted by bad user code, e.g. by an undefined Lisp operation
like (FMAKUNBOUND 'COMPILE), or by stray pointers from alien code or
from unsafe Lisp code; or there might be a bug in the OS or hardware
that SBCL is running on.) If it seems to be a bug in SBCL itself, the
maintainers would like to know about it. Bug reports are welcome on the
SBCL mailing lists, which you can find at
<http://
Backtrace:
0: (SB-C:COMPILER-
1: (SB-C::
2: (SB-INT:
3: ((FLET SB-FASL:
4: (LOAD "/home/
5: (SB-INT:
6: (SB-INT:
7: (EVAL-TLF (PROGN (LOAD "/home/
8: (SB-C::
9: ((FLET SB-C::DEFAULT-
10: (SB-C::
11: (SB-C::
12: (SB-C::
13: (SB-C::
14: ((LAMBDA () :IN SB-C::SUB-
15: ((FLET SB-C::WITH-IT :IN SB-C::%
16: (SB-C::
17: (COMPILE-FILE "~/trash.lisp" :OUTPUT-FILE NIL :VERBOSE NIL :PRINT NIL :EXTERNAL-FORMAT :DEFAULT :TRACE-FILE NIL :BLOCK-COMPILE NIL :EMIT-CFASL NIL)
18: (SB-INT:
19: (EVAL (COMPILE-FILE "~/trash.lisp"))
Behavior is as expected on ABCL and CCL, that is, a read error is reported. If :load-toplevel is omitted, it works (the file is compiled but the read error is reported, and loading the fasl signals an error). If :compile-toplevel is omitted, it works (nothing happens at compile time, and loading the fasl signals an error).
Sorry for the weird test case, but I wasn't sure how to reduce this any further. I ran into this by compiling a file that tried to quickload iolib in an eval-when (bad idea, I know) - iolib.base.asd relies on *compile-
sbcl --version
SBCL 1.0.57.66-5783625
uname -a
Linux Sri2 3.0.0-0300-generic #201107220917 SMP Fri Jul 22 10:10:37 UTC 2011 i686 i686 i386 GNU/Linux
*features*
(:QUICKLISP :SB-BSD-
:COMMON-LISP :SBCL :SB-DOC :SB-TEST :SB-LDB :SB-PACKAGE-LOCKS :SB-UNICODE
:SB-EVAL :SB-SOURCE-
:OS-PROVIDES-
:OS-PROVIDES-PUTWC :OS-PROVIDES-DLADDR :OS-PROVIDES-DLOPEN :LITTLE-ENDIAN
:LINKAGE-TABLE :MULTIPLY-HIGH-VOPS :MEMORY-
:CYCLE-COUNTER :ALIEN-CALLBACKS :STACK-
:STACK-
:STACK-
:UNWIND-
:STACK-
:LINUX :ELF :UNIX :X86)
Changed in sbcl: | |
status: | New → Incomplete |
status: | Incomplete → Triaged |
importance: | Undecided → Medium |
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
36ac54616a084c1 6d34afd03af3efb 51b096b729