[Top][All Lists]

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

seg fault with repeated function calls from C?

From: Anand Dixit
Subject: seg fault with repeated function calls from C?
Date: Mon, 15 Dec 2008 22:22:02 -0800

Hi all,
   I am calling a guile function from my C code. Its a fairly straight
forward implementation. However, as I keep calling this function a
number of times, it breaks at some point with a segmentation fault. Here
is the relevant portion :

int tmp,count=10000;
for (tmp=1;tmp<count;tmp++) {
                func_symbol = scm_c_lookup("EsourceFn");        
  func = scm_variable_ref(func_symbol);
                retValue = scm_num2double(ret,0,"fdtd");
                printf("Value from guile is tmp=%d %g\n",tmp,retValue);

The break point in one case was after 4000+ calls. I was able to
localize the point of failure to the "scm_call_4" line. Any clue would
be greatly appreciated.
  - Anand

reply via email to

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