On Sun, Mar 14, 2010 at 2:08 AM, Seth Burleigh <span dir="ltr"><<a href="mailto:seth@tewebs.com">seth@tewebs.com</a>></span>
wrote:<br>
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">What platform are you using? I updated ecl from the
repository and I<br>
still get a segmentation fault with the new code. I did manage to avoid<br>
this by wrapping the code in a handler-case block and then returning nil<br>
on an error, but it would be nice if an error was indicated by a valuate<br>
that could never have been returned by the lisp code.<br>
<div><div class="h5">
<br>
</div></div></blockquote></div><br>
Seth, what you are describing is what ext:safe-eval does in the last
commit I uploaded yesterday night<br>
<br>
(defun safe-eval (form env &optional (err-value nil err-value-p))<br>
(let ((output nil) (ok nil))<br>
(unwind-protect<br>
(handler-bind ((serious-condition<br>
(if err-value-p<br>
#'(lambda (c)<br>
(return-from safe-eval err-value))<br>
#'invoke-debugger)))<br>
(setf output (si::eval-with-env form env)<br>
ok t))<br>
(return-from safe-eval (if ok output err-value)))))<br>
<br>
You not only have to recompile your code, you have to update and
recompile ECL.<br>
<br>
The whole code is wrapped in a handler-case and returns the THIRD VALUE
you supplied to cl_safe_eval(). So if this value is not meaningful,
sorry, but it is your fault.<br>
<br>
Juanjo<br clear="all"><br>-- <br>Instituto de Física Fundamental, CSIC<br>c/
Serrano, 113b, Madrid 28006 (Spain) <br><a href="http://juanjose.garciaripoll.googlepages.com">http://juanjose.garciaripoll.googlepages.com</a><br>