Andreas Enge on Fri, 07 May 2021 18:11:54 +0200


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

Pari captures my segmentation faults


Hello,

the following programme exits with an error message
  ***   bug in PARI/GP (Segmentation Fault), please report.  ***   Error in the PARI system. End of program.

#include <pari/pari.h>
void main () {
   int *k;
   pari_init (500000, 0);
   k[5] = 1;
}

Notice that PARI somehow captures and claims for itself a segmentation
fault that has nothing to do with it, which makes debugging complicated.
Can this be avoided by initialising PARI differently? If not, this looks
like a bug to me.

It appeared after I changed code of mine so that instead of wrapping each
function making calls to libpari into a pair of pari_init;pari_close,
I did it only once and for all. (And incidentally, the segmentation fault
appeared at the same time in a seemingly unrelated place.) If libpari
takes over all my mistakes, then I would rather revert this change.

Merci pour vos lumières,

Andreas