[Ecls-list] Request for few examples and informations

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Fri Apr 8 22:34:52 UTC 2011


On Fri, Apr 8, 2011 at 11:45 PM, meh. <meh at paranoici.org> wrote:

> On Fri, Apr 08, 2011 at 11:26:21PM +0200, Juan Jose Garcia-Ripoll wrote:
> > On Fri, Apr 8, 2011 at 10:50 PM, meh. <meh at paranoici.org> wrote:
> >
> > >  <
> https://github.com/meh/craftd/blob/master/scripting/lisp/helpers.c#L49>let's
> say the eval'd string is
> > > (asdf:load-system :craftd) if any of the loaded files have a syntax
> > > error my eval function doesn't know something went wrong.
> > > Is there a way to know that?
> > >
> >
> > This has also been dealt with in the mailing list.
>
> I've been looking but it's not easy to find something in this huge
> archive, could you point me in the right direction please?
>

What you had is a lisp problem, not a C problem. If you want clever error
handling, then write it in lisp:
http://article.gmane.org/gmane.lisp.ecl.general/4445/match=my+safe+eval


> At the moment I do:
>
> > ecl_import_current_thread(Cnil, Cnil);
>
> When the thread is created and:
>
> > ecl_release_current_thread();
>
> When the thread is going to stop, I still get a segfault in this way.
>

Have you tried moving those calls inside  cdcl_EventDispatcher ?
From
https://github.com/meh/craftd/blob/master/scripting/lisp/main.c
I do not really see that those functions are called from the main thread
under equal conditions (stack depth, memory, etc). This may perturb the
garbage collector.

Juanjo

-- 
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20110409/b4cb343b/attachment.html>


More information about the ecl-devel mailing list