-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stack overflow when loading varjo in recent CCL #270
Comments
This seems related to the package local nickname system, which I introduced into CCL. I'll take this bug. |
The issue seems related to the functions https://github.com/cbaggers/fn/blob/8d8587d03a7b5e26b306fc90018e385d9e5acc2c/mad.lisp#L297-L300 (defun default-form-handler (first &rest rest)
`(list ,(if (symbolp first)
`',first
(e first)) ,@(e-list rest))) (defun e (form)
(flet ((handle (form)
(apply (form-handler (first form)) form)))
(cond ((and (listp form) (gethash (first form) *form-handler*))
(handle form))
(t
(multiple-value-bind (form expanded)
(macroexpand-1 form *env*)
(cond (expanded
(e form))
(t
(typecase form
(null nil)
(list
(let ((next (compiler-macroexpand-1 form)))
(if (eq form next)
(handle form)
(e next))))
(t
`',form))))))))) |
The four repeating backtrace lines are: (HANDER-PROGN LOCALLY
(DECLARE (NOTINLINE INTERN))
(INTERN LISP-NAME :VARI.GLSL))
(E-LIST ((CCL::PACKAGE-%LOCAL-NICKNAMES *PACKAGE*)
(LOCALLY # #)
(CCL::%PKG-REF-INTERN LISP-NAME #)))
(DEFAULT-FORM-HANDLER IF
(CCL::PACKAGE-%LOCAL-NICKNAMES *PACKAGE*)
(LOCALLY (DECLARE #)
(INTERN LISP-NAME :VARI.GLSL))
(CCL::%PKG-REF-INTERN LISP-NAME (LOAD-TIME-VALUE #)))
(E-LIST ((DECLARE #)
(INTERN LISP-NAME :VARI.GLSL))) |
I recognize the following form. (IF
(CCL::PACKAGE-%LOCAL-NICKNAMES *PACKAGE*)
(LOCALLY (DECLARE #)
(INTERN LISP-NAME :VARI.GLSL))
(CCL::%PKG-REF-INTERN LISP-NAME (LOAD-TIME-VALUE #))) It is this part of my commit: https://github.com/Clozure/ccl/pull/188/files#diff-7dbee25941139b1e1582d8f0c87f1b23R2430-R2432 This code from |
I say that this is not a CCL issue. CLHS NOTINLINE says,
The macroexpansion machinery contained in the |
Until FN is fixed, a workaround is available at cbaggers/cepl#350 (comment) |
cbaggers#239 infinite loop stack overflow crash This fix from Devon7 cbaggers/cepl#350 (comment) Issue explained in Clozure/ccl#270 (comment) CLHS NOTINLINE says, In the presence of a compiler macro definition for function-name, a notinline declaration prevents that compiler macro from being used. The macroexpansion machinery contained in the fn library ignores this fact and recursively compiler-macroexpands the INTERN form which was explicitly declared NOTINLINE, which leads into infinite loops as demonstrated here.
To trigger:
(ql:quickload :varjo)
Works:
Clozure Common Lisp Version 1.11.6 DarwinX8664
Clozure Common Lisp Version 1.12-dev (v1.12-dev.3-24-g1fd2a4b4) DarwinX8664
SBCL, ECL, ABCL
Fails:
Clozure Common Lisp Version 1.12-dev (v1.12-dev.5-17-g58d4d91c) DarwinX8664
Not sure that it's not an issue with
varjo
orfn
, but appeared recently, and only with CCL, so filing here.Same behavior with both
master
andrelease-quicklisp
branches.The text was updated successfully, but these errors were encountered: