On Sat, Nov 07, 2020 at 02:32:41PM +0100, Julien Puydt wrote: > Le samedi 07 novembre 2020 à 11:05 +0100, Bill Allombert a écrit : > > Too late for that, I'll close by hand.
Thanks! > > > but still, crashing is pretty bad : it should detect > > > the value is too low at startup and complain. > > > > The amount of stack needed depend on the computation the user > > requested, so it is the responsibiity of the user to set the stack > > size. However, the user can set parisizemax to allow PARI to increase > > the stack as needed up to parisizemax. > > > > If the stack is still too low, then you get an error that you can > > trap and recover from. It seems giac recovery code does not handle > > pari stack overflow correctly. This should be fixed, but this is not > > a RC bug in pari, and probably not a regression. > > Can you lend a hand with that? I already rewrote that code for upstream > (it had problems with threaded/non-threaded), but I mostly made it > better than before, not perfect... I will have a second look tomorrow, but it seems the code make no attempt to recover from PARI errors. (it does not call gp_context_save/gp_context_restore). The code trying to run the non MT-safe version of PARI in multithread mode leads to very messy code. It should have been removed 12 years ago... Cheers, Bill