I'm using CLISP 2.30 on Windows NT.
The following will cause a stack overflow:
(let ((table (make-hash-table)))
(setf (gethash 'self table) table))
*** - Lisp stack overflow. RESET
I suppose this is a bug.
I'm not subscribing to this list, so I would appreciate any feedback.If my
email doesn't appear reach me at:
(map 'string #'code-char '(114 111 108 97 110 100 64 110 101 116 113 117 97
110 116 46 99 111 109 46 98
From: Sam Steingold <sds@gn...> - 2002-12-18 23:50:27
> * In message <184.108.40.206.0.20021218190528.030d49f0@...>
> * On the subject of "[clisp-list] setf causing stack overfl. w/ hash-table"
> * Sent on Wed, 18 Dec 2002 19:17:15 -0200
> * Honorable Roland <roland@...> writes:
> I'm using CLISP 2.30 on Windows NT.
> The following will cause a stack overflow:
> (let ((table (make-hash-table)))
> (setf (gethash 'self table) table))
> *** - Lisp stack overflow. RESET
* You will always get a stack overflow when you try to print a
circular object (list or structure) and *PRINT-CIRCLE* is NIL.
Just set *PRINT-CIRCLE* to T.
> I'm not subscribing to this list, so I would appreciate any
> feedback.If my email doesn't appear reach me at:
you can read this list on gmane.org.
note that not everyone on this list will honor such a request.
Sam Steingold (http://www.podval.org/~sds) running RedHat8 GNU/Linux
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
Those who value Life above Freedom are destined to lose both.
CLISP contains a foreign function and foreign variable registry keyed on
symbol name, which forbids duplicate registration. If you happen to have
two FFI modules in your image which try to target the same library
function, you get a nasty error, such as:
*** - A foreign function "strerror" already exists
1. Break >
This is a problem because you have to write your own wrappers for every
library function to ensure it has a unique name, or else risk clashing
with other pwople's modules that you don't even know about. Or you can
use some GNU toolchain extensions to create symbol aliases, if you
don't want wrappers, but that's still annoying.
It would be nice if the foreign function hash table was keyed on something
other in addition to the name, like maybe it could be an #'equal table
keyed on (list function-name package-name), and some way to specify the
that second element could be worked into the def-call-* macros. Or they
could implicitly pick it up from the current *package*, even.
This seems like a bit of work, because it affects what goes into the .c
file generated from the FFI .lisp module. E.g. this:
var module_t* module;
has to become this:
var module_t* module;
And of course register_foreign_function and register_foreign_variable
have to be changed and every place that refers to the hash table and so
Any other ideas? What if, quite simply, duplicate registrations were
silently permitted? What would break?