Bernard Parisse on Fri, 23 Jun 2006 10:25:15 +0200

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



I have a problem when using flisexpr inside a threaded program 
(more precisely I'm adding a pari command to xcas that should be able
to execute any PARI command inside xcas, e.g. pari(Euler)),
it seems related to the PARI_stack_limit check in src/language/anal.c,
line 1959. The &ptr (in a thread call) is (much) lower than PARI_stack_limit
and PARI dies with a Deep recursion error (the same code inside
the readline non-threaded interface icas works correctly). I guess
this check is here to avoid user recursive calls that end with
a SEGFAULT (stack capacity exceeded).
My current fix was to
  1/ declare PARI_stack_limit in src/headers/paridecl.h
  2/ set PARI_stack_limit to 0 in xcas code before calling flisexpr
  (more precisely in the file src/ from giac-0.6.0.tar.gz)
It works but it requires modification in the pari library to build
xcas. Is there another way to do it?

Bernard Parisse