Bugs item #2728484, was opened at 2009-04-03 17:05
Message generated for change (Tracker Item Submitted) made by normang
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=379534&aid=2728484&group_id=23735
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: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Norman Gray (normang)
Assigned to: Nobody/Anonymous (nobody)
Summary: Recursive library import causes StackOverflowError
Initial Comment:
When two modules require each other, SISC produces a StackOverflowError.
Such a mutual import may or may not be a good thing to do, but it's not documented in the manual (ch 10) as being forbidden, and even if it is to be forbidden, it would probably be best to detect and forbid it explicitly.
% cat m1.scm
(require-library 'm2)
(module m1
(m1-function)
(import m2)
(define (m1-function)
'm1))
% cat m2.scm
(require-library 'm1)
(module m2
(m2-function)
(import m1)
(define (m2-function)
'm2))
% sisc
SISC (1.16.6)
#;> (require-library 'm1)
Exception in thread "Thread-2" java.lang.StackOverflowError
at sisc.nativefun.NativeProcedure.apply(Unknown Source)
at sisc.exprs.AppEval.eval(Unknown Source)
at sisc.interpreter.Interpreter.next(Unknown Source)
at sisc.exprs.AppExp.eval(Unknown Source)
...
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=379534&aid=2728484&group_id=23735
|