chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Segfault when trying to embed Scheme code (4.2.0)


From: Jeronimo Pellegrini
Subject: Re: [Chicken-users] Segfault when trying to embed Scheme code (4.2.0)
Date: Mon, 26 Oct 2009 13:58:52 -0200
User-agent: Mutt/1.5.20 (2009-06-14)

Hi,

So -- I uninstalled my previous Chicken SVN version and installed 4.2.0;
the problem still happens:

I was trying to compile the example in
http://chicken.wiki.br/man/4/Embedding

(The example right below CHICKEN_yield)

So, I copied and pasted x.scm and y.c, and
used the same command line:

$ csc x.scm y.c -embedded

Then tried to run it:

$ ./x
data: 55d5ba68
Segmentation fault


This example also segfaulted:

a.c:

/-----------
#include <chicken.h>
#include <stdio.h>

extern threetimes (int);

int main() {
    printf("See: %d\n", threetimes(2));
}
\-----------

a.scm:

/-----------
(define-external (threetimes (int n)) int
  (* n n n))
\-----------

$ csc a.scm a.c -embedded -d2

$./a
Segmentation fault

So... How do I debug those? I tried running the binary in gdb,
but the only thing it told me was that the segfault was in
the function "threetimes";

Is there something else I should have done? (I think I understood
what was in the Wiki, but I could be wrong)

Thanks,
J.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]