From: David Dreisigmeyer <dwdreisigme...@gmail.com>
Subject: [Chicken-users] embedding question / seg fault
Date: Fri, 14 Jan 2011 09:59:55 -0500

> OS X 10.6.6 with Chicken 4.6.0
> 
> Hi,
> 
> I was trying our the embedding example under CHICKEN_yield here:
> 
> http://wiki.call-cc.org/man/4/Embedding
> 
> I keep getting a seg fault and this seems to be the offending line:
> 
> CHICKEN_get_error_message(buffer, 255);
> 
> If I comment that out there's no seg fault.

I get a different error, but it is likely to be caused by the same
problem: the compiler "optimizes" the compiled procedure for
`CHICKEN_get_error_message' into a "leaf routine" (which uses
different calling conventions than normal procedures). I have disabled
this optimization for all external callback procedures, since the
calling convention may not change in this case. See the experimental
branch.

> 
> I looked at this post:
> 
> http://www.mail-archive.com/chicken-users@nongnu.org/msg11218.html
> 
> but I don't see what the resolution would be.
> 
> Would it be easier to just avoid using define and stick to
> define-external?  Is there any particular reason to use define?

Sorry, I don't fully understand what you are trying to say. You
can only call procedures from outside of Scheme which are
defined with `define-external'.

> 
> FYI, I'm trying to call Chicken commands from Python using Cython.
> 

Interesting idea. Keep us informed about your progress, please.


cheers,
felix

_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to