[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re: Segmentation Error using SI:FASLINK

I wrote the following lisp program:

	(defun fact (i) (cond ((< i 1) 1) (t (* i (fact (- i 1)))))))

When I load it into kcl it works fine:

	% kcl
	AKCL (Austin Kyoto Common Lisp)  Version(1.257) Tue Jan  2 16:03:23 EST 1990
	Contains Enhancements by W. Schelter
	Changes in version 1-225 definitely require recompilation of user files.
	>(load "fact.lsp")
	Loading fact.lsp
	Finished loading fact.lsp
	>(fact 1) 
	>(fact 2)
	>(fact 3)

It also compiles ok:

	>(compile-file "fact.lsp")
	Compiling fact.lsp.
	End of Pass 1.  
	End of Pass 2.  
	OPTIMIZE levels: Safety=0 (No runtime error checking), Space=0, Speed=3
	Finished compiling fact.lsp.

Furthermore, when loaded it runs ok:

	>(load "fact.o")       
	Loading fact.o
	Finished loading fact.o
	>(fact 2)
	>(fact 3)

However, it will not load with faslink:
	>(si:faslink "fact.o" "")
	Segmentation violation: c stack ok:signalling error
	Error: Caught fatal error [memory may be damaged]
	Error signalled by SYSTEM:FASLINK.
	Broken at EVAL.  Type :H for Help.

Is this an error in kcl or am I making a mistake?
Thanks for the help.