failed AVER: (NULL CURRENT)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I reproduced the bug on SBCL 1.0.58 and 1.1.17. It is somehow related to NREVERSE macros arguments, because REVERSE doesn't trigger SB-INT:BUG.
$ uname -a
Darwin snv-mbp.local 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012; root:xnu-
$ sh run-sbcl.sh
(running SBCL from: .)
This is SBCL 1.1.17, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://
SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
* (defmacro foo (xs)
(second (reduce
(lambda (n x)
(cons (cons t (cons '(= t t) x))
(cons () (nreverse xs)))))
FOO
* (defun bar () (foo (t ((t)))))
debugger invoked on a SB-INT:BUG:
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://
restarts (invokable by number or by possibly-
0: [ABORT] Exit debugger, returning to top level.
(SB-INT:BUG "~@<failed AVER: ~2I~_~A~:>" (NULL SB-C::CURRENT))
0]
Changed in sbcl: | |
status: | New → Invalid |
Your macro is mutating source, via nreverse. This is a bad idea in many ways. I'm not even sure that I want to remove that AVER: it reflects the fact that the mutated source makes no sense anymore.