Hi,

Le 07/03/2015 22:48, Bill Allombert a écrit :
On Sat, Mar 07, 2015 at 12:59:36PM +0100, Julien Puydt wrote:
How does cb_pari_err_recover() work ?

Their cb_pari_err_handle detects if it's a short stack problem
(errnum == e_STACK), in which case it doubles the stack and doesn't
throw an exception. If it's another problem, it blocks exceptions,
throws one and unblock.

Then cb_pari_err_recover gets called: if no exception has been
thrown, it decides the stack was doubled and retries. If an
exception has been thrown, it throws it further.

Why cannot this be done directly by cb_pari_err_handle ?
Rethrow the error seems needlessly complex.

Yes, I'll try to simplify that. I have now found that in each and every segmentation fault case, I only get an 'ok3' displayed before the error, with the following code : print('ok3')


        s = closure_func_err()
        if s is not NULL:
print('ok4')


pari_error_string = s.decode('ascii') + ": " + pari_error_string print('ok5')


raise PariError(errnum, pari_error_string, pari_instance.new_gen_noclear(E))

So my conclusion is that the segfault is triggered by calling closure_func_err! It looks like this function is supposed to make the error messages more precise : how come it sometimes just crashes?

We're slowly getting there...

Snark on #debian-science


--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to